Skip to content

Commit 5bd7bd4

Browse files
add more yang tests
Signed-off-by: Stepan Blyschak <[email protected]>
1 parent 78a5964 commit 5bd7bd4

File tree

2 files changed

+36
-10
lines changed

2 files changed

+36
-10
lines changed

src/sonic-yang-models/tests/yang_model_tests/tests/auto_techsupport.json

+10-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"AUTO_TECHSUPPORT_INVALID_RATE_LIMIT_FORMAT": {
1010
"desc" : "Configure cooloff with a value of invalid format",
11-
"eStrKey": "InvalidValue"
11+
"eStrKey": "InvalidValue"
1212
},
1313
"AUTO_TECHSUPPORT_OUT_OF_RANGE_DECIMAL": {
1414
"desc" : "Configure a value for core-uage outside the range [0, 100)",
@@ -19,7 +19,7 @@
1919
},
2020
"AUTO_TECHSUPPORT_INVALID_FRACTION_DIGITS": {
2121
"desc" : "Configure a value for max_techsupport_size inside the range [0, 100) but with 3 fractional digits",
22-
"eStrKey": "InvalidValue"
22+
"eStrKey": "InvalidValue"
2323
},
2424
"AUTO_TECHSUPPORT_RATE_LIMIT_INTERVAL_TEST": {
2525
"desc" : "Configure and test the valid configuration"
@@ -29,6 +29,13 @@
2929
},
3030
"AUTO_TECHSUPPORT_INVALID_AVAILABLE_MEM_THRESHOLD": {
3131
"desc" : "Configure a value for available_mem_threshold inside the range [0, 100) but with 3 fractional digits",
32-
"eStrKey": "InvalidValue"
32+
"eStrKey": "InvalidValue"
33+
},
34+
"AUTO_TECHSUPPORT_GLOBAL_MEM_THRESHOLD_VALID": {
35+
"desc" : "Configure and test the valid configuration"
36+
},
37+
"AUTO_TECHSUPPORT_GLOBAL_MEM_THRESHOLD_INVALID_THRESHOLD": {
38+
"desc" : "Configure a value for available_mem_threshold inside the range [0, 100) but with 3 fractional digits",
39+
"eStrKey": "InvalidValue"
3340
}
3441
}

src/sonic-yang-models/tests/yang_model_tests/tests_config/auto_techsupport.json

+26-7
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"max_techsupport_limit" : "10.0",
99
"max_core_limit" : "5.0",
1010
"since" : "2 days ago"
11-
}
11+
}
1212
}
1313
}
1414
},
@@ -20,8 +20,8 @@
2020
"rate_limit_interval" : "180",
2121
"max_techsupport_limit" : "10.0",
2222
"max_core_limit" : "5.0",
23-
"since" : "2 days ago"
24-
}
23+
"since" : "2 days ago"
24+
}
2525
}
2626
}
2727
},
@@ -30,7 +30,7 @@
3030
"sonic-auto_techsupport:AUTO_TECHSUPPORT": {
3131
"sonic-auto_techsupport:GLOBAL": {
3232
"rate_limit_interval" : "whatever"
33-
}
33+
}
3434
}
3535
}
3636
},
@@ -40,7 +40,7 @@
4040
"sonic-auto_techsupport:GLOBAL": {
4141
"max_core_limit" : "100.00",
4242
"rate_limit_interval" : "180"
43-
}
43+
}
4444
}
4545
}
4646
},
@@ -50,7 +50,7 @@
5050
"sonic-auto_techsupport:GLOBAL": {
5151
"max_techsupport_limit" : "11.23",
5252
"max_core_limit" : "99.99"
53-
}
53+
}
5454
}
5555
}
5656
},
@@ -60,7 +60,7 @@
6060
"sonic-auto_techsupport:GLOBAL": {
6161
"max_techsupport_limit" : "11.111",
6262
"max_core_limit" : "99.99"
63-
}
63+
}
6464
}
6565
}
6666
},
@@ -82,6 +82,25 @@
8282
}
8383
}
8484
},
85+
"AUTO_TECHSUPPORT_GLOBAL_MEM_THRESHOLD_VALID": {
86+
"sonic-auto_techsupport:sonic-auto_techsupport": {
87+
"sonic-auto_techsupport:AUTO_TECHSUPPORT": {
88+
"sonic-auto_techsupport:GLOBAL": {
89+
"available_mem_threshold": "10.0",
90+
"min_available_mem": "900"
91+
}
92+
}
93+
}
94+
},
95+
"AUTO_TECHSUPPORT_GLOBAL_MEM_THRESHOLD_INVALID_THRESHOLD": {
96+
"sonic-auto_techsupport:sonic-auto_techsupport": {
97+
"sonic-auto_techsupport:AUTO_TECHSUPPORT": {
98+
"sonic-auto_techsupport:GLOBAL": {
99+
"available_mem_threshold": "11.111"
100+
}
101+
}
102+
}
103+
},
85104
"AUTO_TECHSUPPORT_AVAILABLE_MEM_THRESHOLD": {
86105
"sonic-auto_techsupport:sonic-auto_techsupport": {
87106
"sonic-auto_techsupport:AUTO_TECHSUPPORT_FEATURE": {

0 commit comments

Comments
 (0)