You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[GCU] Moving PatchSorter unit-test to json file to make it easier to read/maintain (sonic-net#1977)
#### What I did
Moved PatchSorter unit-test to json file to make it easier to read/maintain
In the future this test json file can be used for adding nightly tests.
While testing I had to set `skip_exact_change_list_match=True` because different runs of the same input produce correct but different changes. It is better to always generate the same steps for easier debugging. Created issue: sonic-net#1976
#### How I did it
Copied to Json file the following:
- current_config i.e. current running config
- patch
- expected change list
#### How to verify it
unit-tests
"desc": "Emptying a configdb table fails because empty tables are not allowed in configdb. User should remove whole table instead e.g. remove /ACL_TABLE in this case.",
4
+
"current_config": {
5
+
"ACL_TABLE": {
6
+
"EVERFLOW": {
7
+
"policy_desc": "EVERFLOW",
8
+
"ports": [
9
+
"Ethernet0"
10
+
],
11
+
"stage": "ingress",
12
+
"type": "MIRROR"
13
+
}
14
+
},
15
+
"PORT": {
16
+
"Ethernet0": {
17
+
"alias": "Eth1",
18
+
"lanes": "65, 66, 67, 68",
19
+
"description": "Ethernet0 100G link",
20
+
"speed": "100000"
21
+
}
22
+
}
23
+
},
24
+
"patch": [
25
+
{"op": "remove", "path": "/ACL_TABLE/EVERFLOW"}
26
+
],
27
+
"expected_error_substrings": [
28
+
"There is no possible sorting"
29
+
]
30
+
},
31
+
"ADDING_AN_EMPTY_CONFIGDB_TABLE__FAILURE": {
32
+
"desc": "Adding an empty configdb table fail because empty tables are not allowed in configdb.",
33
+
"current_config": {},
34
+
"patch": [
35
+
{"op": "add", "path": "/VLAN", "value": {}}
36
+
],
37
+
"expected_error_substrings": [
38
+
"There is no possible sorting"
39
+
]
40
+
},
41
+
"EMPTYING_MULTIPLE_CONFIGDB_TABLE__FAILURE": {
42
+
"desc": "Emptying multiple configdb table fails because empty tables are not allowed in configdb. User should remove whole tables instead e.g. remove /PORT and /ACL_TABLE in this case.",
0 commit comments