Skip to content

Commit ceecb48

Browse files
committed
remove duplicate tests
1 parent c367995 commit ceecb48

File tree

1 file changed

+0
-56
lines changed

1 file changed

+0
-56
lines changed

tests/generic_config_updater/gu_common_test.py

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -72,62 +72,6 @@ def setUp(self):
7272
self.config_wrapper_mock = gu_common.ConfigWrapper()
7373
self.config_wrapper_mock.get_config_db_as_json=MagicMock(return_value=Files.CONFIG_DB_AS_JSON)
7474

75-
@patch("sonic_py_common.device_info.get_sonic_version_info", mock.Mock(return_value={"asic_type": "mellanox", "build_version": "SONiC.20181131"}))
76-
def test_validate_field_operation_legal__pfcwd(self):
77-
old_config = {"PFC_WD": {"GLOBAL": {"POLL_INTERVAL": "60"}}}
78-
target_config = {"PFC_WD": {"GLOBAL": {"POLL_INTERVAL": "40"}}}
79-
config_wrapper = gu_common.ConfigWrapper()
80-
config_wrapper.validate_field_operation(old_config, target_config)
81-
82-
def test_validate_field_operation_illegal__pfcwd(self):
83-
old_config = {"PFC_WD": {"GLOBAL": {"POLL_INTERVAL": "60"}}}
84-
target_config = {"PFC_WD": {"GLOBAL": {}}}
85-
config_wrapper = gu_common.ConfigWrapper()
86-
self.assertRaises(gu_common.IllegalPatchOperationError, config_wrapper.validate_field_operation, old_config, target_config)
87-
88-
@patch("sonic_py_common.device_info.get_sonic_version_info", mock.Mock(return_value={"build_version": "SONiC.20181131"}))
89-
@patch("generic_config_updater.field_operation_validators.get_asic_name", mock.Mock(return_value="unknown"))
90-
def test_validate_field_modification_illegal__pfcwd(self):
91-
path = "/PFC_WD/GLOBAL/POLL_INTERVAL"
92-
operation = "replace"
93-
assert generic_config_updater.field_operation_validators.rdma_config_update_validator(path, operation) == False
94-
95-
def test_validate_field_operation_legal__rm_loopback1(self):
96-
old_config = {
97-
"LOOPBACK_INTERFACE": {
98-
"Loopback0": {},
99-
"Loopback0|10.1.0.32/32": {},
100-
"Loopback1": {},
101-
"Loopback1|10.1.0.33/32": {}
102-
}
103-
}
104-
target_config = {
105-
"LOOPBACK_INTERFACE": {
106-
"Loopback0": {},
107-
"Loopback0|10.1.0.32/32": {}
108-
}
109-
}
110-
config_wrapper = gu_common.ConfigWrapper()
111-
config_wrapper.validate_field_operation(old_config, target_config)
112-
113-
def test_validate_field_operation_illegal__rm_loopback0(self):
114-
old_config = {
115-
"LOOPBACK_INTERFACE": {
116-
"Loopback0": {},
117-
"Loopback0|10.1.0.32/32": {},
118-
"Loopback1": {},
119-
"Loopback1|10.1.0.33/32": {}
120-
}
121-
}
122-
target_config = {
123-
"LOOPBACK_INTERFACE": {
124-
"Loopback1": {},
125-
"Loopback1|10.1.0.33/32": {}
126-
}
127-
}
128-
config_wrapper = gu_common.ConfigWrapper()
129-
self.assertRaises(gu_common.IllegalPatchOperationError, config_wrapper.validate_field_operation, old_config, target_config)
130-
13175
def test_ctor__default_values_set(self):
13276
config_wrapper = gu_common.ConfigWrapper()
13377

0 commit comments

Comments
 (0)