Skip to content

Commit

Permalink
update unit test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
lmingz committed Feb 27, 2023
1 parent b750e82 commit d836f46
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@
"FG_NHG_MEMBER_TEST_INVALID_IP": {
"desc": "Fine-grained ECMP next-hop member configuration with invalid IP value in FG_NHG_MEMBER_LIST table.",
"eStrKey" : "InvalidValue",
"eStr": "next_hop_ip"
"eStr": ["next_hop_ip"]
},
"FG_NHG_PREFIX_TEST_INVALID_PREFIX":{
"desc": "Fine-grained ECMP prefix configuration with invalid prefix value in FG_NHG_PREFIX_LIST table.",
"eStrKey" : "InvalidValue",
"eStr": "ip_prefix"
"eStr": ["ip_prefix"]
},
"FG_NHG_MEMBER_TEST_MISSING_FG_NHG_REF": {
"desc": "Fine-grained ECMP next-hop member configuration with missing FG_NHG reference in FG_NHG_MEMBER_LIST table.",
"eStr": "Missing reference"
"eStr": "Missing required element \"FG_NHG\" in \"FG_NHG_MEMBER_LIST\". "
},
"FG_NHG_PREFIX_TEST_MISSING_FG_NHG_REF": {
"desc": "Fine-grained ECMP prefix configuration with missing FG_NHG reference in FG_NHG_PREFIX_LIST table.",
"eStr": "Missing reference"
"eStr": "Missing required element \"FG_NHG\" in \"FG_NHG_PREFIX_LIST\". "
},
"FG_NHG_MEMBER_TEST_MISSING_BANK": {
"desc": "Fine-grained ECMP next-hop member configuration with missing bank in FG_NHG_MEMBER_LIST table.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@
}
},
"FG_NHG_MEMBER_TEST": {
"sonic-portchannel:PORTCHANNEL:PORTCHANNEL_LIST": [
{
"name": "PortChannel",
"admin_status": "up"
},{
"name": "PortChannel2",
"admin_status": "up"
}
],
"sonic-fine-grained-ecmp:sonic-fine-grained-ecmp": {
"sonic-fine-grained-ecmp:FG_NHG": {
"FG_NHG_LIST": [
Expand All @@ -69,13 +78,13 @@
"next_hop_ip": "10.0.0.1",
"FG_NHG": "group1",
"bank": 1,
"link": "Ethernet1"
"link": "PortChannel"
},
{
"next_hop_ip": "10.0.0.2",
"FG_NHG": "group1",
"bank": 2,
"link": "Ethernet2"
"link": "PortChannel2"
},
{
"next_hop_ip": "10.1.0.1",
Expand Down Expand Up @@ -132,13 +141,18 @@
}
},
"FG_NHG_MEMBER_TEST_MISSING_FG_NHG_REF": {
"sonic-portchannel:PORTCHANNEL:PORTCHANNEL_LIST":[
{
"name": "PortChannel1",
"admin_status": "up"
}],
"sonic-fine-grained-ecmp:sonic-fine-grained-ecmp": {
"sonic-fine-grained-ecmp:FG_NHG_MEMBER": {
"FG_NHG_MEMBER_LIST": [
{
"next_hop_ip": "10.0.0.1",
"bank": 1,
"link": "Ethernet1"
"link": "PortChannel1"
}
]
}
Expand All @@ -157,6 +171,15 @@
},
"FG_NHG_MEMBER_TEST_MISSING_BANK": {
"sonic-fine-grained-ecmp:sonic-fine-grained-ecmp": {
"sonic-fine-grained-ecmp:FG_NHG": {
"FG_NHG_LIST": [
{
"name": "group1",
"bucket_size": 10,
"match_mode": "nexthop-based"
}
]
},
"sonic-fine-grained-ecmp:FG_NHG_MEMBER": {
"FG_NHG_MEMBER_LIST": [
{
Expand Down

0 comments on commit d836f46

Please sign in to comment.