Skip to content

Commit

Permalink
add link_training tests to yang_model_tests
Browse files Browse the repository at this point in the history
Signed-off-by: Dante Su <dante.su@broadcom.com>
  • Loading branch information
ds952811 committed May 10, 2022
1 parent 2704c2f commit d1c6222
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/sonic-yang-models/tests/yang_model_tests/tests/port.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,17 @@
"desc": "PORT_INVALID_ADVTYPES_TEST_2 must condition failure.",
"eStrKey" : "Must"
},
"PORT_VALID_LINK_TRAINING_TEST_1": {
"desc": "PORT_VALID_LINK_TRAINING_TEST_1 no failure."
},
"PORT_VALID_LINK_TRAINING_TEST_2": {
"desc": "PORT_VALID_LINK_TRAINING_TEST_2 no failure."
},
"PORT_INVALID_LINK_TRAINING_TEST": {
"desc": "PORT_INVALID_LINK_TRAINING_TEST must condition failure.",
"eStrKey" : "Pattern",
"eStr": ["on|off"]
},
"PORT_INVALID_TPID_TEST": {
"desc": "PORT_INVALID_TPID_TEST invalid tpid value failure.",
"eStrKey" : "Pattern",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,57 @@
}
},

"PORT_VALID_LINK_TRAINING_TEST_1": {
"sonic-port:sonic-port": {
"sonic-port:PORT": {
"PORT_LIST": [
{
"name": "Ethernet8",
"alias": "eth8",
"lanes": "65",
"speed": 25000,
"tpid": "0x8100",
"link_training": "on"
}
]
}
}
},

"PORT_VALID_LINK_TRAINING_TEST_2": {
"sonic-port:sonic-port": {
"sonic-port:PORT": {
"PORT_LIST": [
{
"name": "Ethernet8",
"alias": "eth8",
"lanes": "65",
"speed": 25000,
"tpid": "0x8100",
"link_training": "off"
}
]
}
}
},

"PORT_INVALID_LINK_TRAINING_TEST": {
"sonic-port:sonic-port": {
"sonic-port:PORT": {
"PORT_LIST": [
{
"name": "Ethernet8",
"alias": "eth8",
"lanes": "65",
"speed": 25000,
"tpid": "0x8100",
"link_training": 0
}
]
}
}
},

"PORT_INVALID_TPID_TEST": {
"sonic-port:sonic-port": {
"sonic-port:PORT": {
Expand Down

0 comments on commit d1c6222

Please sign in to comment.