Skip to content

Commit ebf4e58

Browse files
Add test-cases for new boolean_type
1 parent c16a335 commit ebf4e58

File tree

3 files changed

+27
-6
lines changed

3 files changed

+27
-6
lines changed

src/sonic-yang-models/tests/files/sample_config_db.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,9 +1201,9 @@
12011201
"FEATURE": {
12021202
"bgp": {
12031203
"auto_restart": "enabled",
1204-
"has_global_scope": "false",
1205-
"has_per_asic_scope": "true",
1206-
"has_timer": "false",
1204+
"has_global_scope": "False",
1205+
"has_per_asic_scope": "True",
1206+
"has_timer": "False",
12071207
"high_mem_alert": "disabled",
12081208
"state": "enabled"
12091209
},

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,10 @@
66
"desc": "Referring invalid feature state.",
77
"eStrKey": "Pattern",
88
"eStr": ["enabled|disabled|always_enabled"]
9+
},
10+
"FEATURE_WITH_INVALID_BOOLEAN_TYPE" : {
11+
"desc": "Referring invalid feature boolean types.",
12+
"eStrKey": "Pattern",
13+
"eStr": ["false|true|False|True"]
914
}
1015
}

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

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
"name": "database",
88
"state": "always_enabled",
99
"auto_restart": "always_enabled",
10-
"has_timer": "false",
11-
"has_global_scope": "true",
12-
"has_per_asic_scope": "true"
10+
"has_timer": "False",
11+
"has_global_scope": "True",
12+
"has_per_asic_scope": "True"
1313
},
1414
{
1515
"name": "swss",
@@ -62,5 +62,21 @@
6262
]
6363
}
6464
}
65+
},
66+
"FEATURE_WITH_INVALID_BOOLEAN_TYPE": {
67+
"sonic-feature:sonic-feature": {
68+
"sonic-feature:FEATURE": {
69+
"FEATURE_LIST": [
70+
{
71+
"name": "database",
72+
"state": "always_enabled",
73+
"auto_restart": "always_enabled",
74+
"has_timer": "FALSE",
75+
"has_global_scope": "TRUE",
76+
"has_per_asic_scope": "TRUE"
77+
}
78+
]
79+
}
80+
}
6581
}
6682
}

0 commit comments

Comments
 (0)