Skip to content

Commit 27550c6

Browse files
author
Sviatoslav Boichuk
committed
Added Tests for YANG model
1 parent 17219c1 commit 27550c6

File tree

3 files changed

+72
-0
lines changed

3 files changed

+72
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2623,6 +2623,14 @@
26232623
"dpu1": {
26242624
"midplane_interface": "dpu1"
26252625
}
2626+
},
2627+
"BANNER_MESSAGE": {
2628+
"global": {
2629+
"state": "enabled",
2630+
"login": "Some login message",
2631+
"motd": "Some message of the day",
2632+
"logout": "Some logout message"
2633+
}
26262634
}
26272635
},
26282636
"SAMPLE_CONFIG_DB_UNKNOWN": {
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"BANNER_MESSAGE_TEST_STATE": {
3+
"desc": "Configure Banner feature state."
4+
},
5+
"BANNER_MESSAGE_TEST_LOGIN" : {
6+
"desc": "Banner login messages configuration in BANNER_MESSAGE table."
7+
},
8+
"BANNER_MESSAGE_TEST_MOTD" : {
9+
"desc": "Banner MOTD messages configuration in BANNER_MESSAGE table."
10+
},
11+
"BANNER_MESSAGE_TEST_LOGOUT" : {
12+
"desc": "Banner logout messages configuration in BANNER_MESSAGE table."
13+
}
14+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"BANNER_MESSAGE_TEST_STATE": {
3+
"sonic-banner:sonic-banner": {
4+
"sonic-banner:BANNER_MESSAGE": {
5+
"global": {
6+
"state": "enabled",
7+
"login": "Some login message",
8+
"motd": "Some message of the day",
9+
"logout": "Some logout message"
10+
}
11+
}
12+
}
13+
},
14+
"BANNER_MESSAGE_TEST_LOGIN": {
15+
"sonic-banner:sonic-banner": {
16+
"sonic-banner:BANNER_MESSAGE": {
17+
"global": {
18+
"state": "enabled",
19+
"login": "Some login message",
20+
"motd": "Some message of the day",
21+
"logout": "Some logout message"
22+
}
23+
}
24+
}
25+
},
26+
"BANNER_MESSAGE_TEST_MOTD": {
27+
"sonic-banner:sonic-banner": {
28+
"sonic-banner:BANNER_MESSAGE": {
29+
"global": {
30+
"state": "enabled",
31+
"login": "Some login message",
32+
"motd": "Some message of the day",
33+
"logout": "Some logout message"
34+
}
35+
}
36+
}
37+
},
38+
"BANNER_MESSAGE_TEST_LOGOUT": {
39+
"sonic-banner:sonic-banner": {
40+
"sonic-banner:BANNER_MESSAGE": {
41+
"global": {
42+
"state": "enabled",
43+
"login": "Some login message",
44+
"motd": "Some message of the day",
45+
"logout": "Some logout message"
46+
}
47+
}
48+
}
49+
}
50+
}

0 commit comments

Comments
 (0)