From b750e8240ca32c9006710cc4d6465a98072a7c2a Mon Sep 17 00:00:00 2001 From: Mingzhi Leng Date: Mon, 27 Feb 2023 14:21:25 -0800 Subject: [PATCH] update unit test --- .../tests/fine-grained-ecmp.json | 6 ++-- .../tests_config/fine_grained_ecmp.json | 36 +++++-------------- 2 files changed, 12 insertions(+), 30 deletions(-) diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/fine-grained-ecmp.json b/src/sonic-yang-models/tests/yang_model_tests/tests/fine-grained-ecmp.json index a8e047d2b087..b2273992a439 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests/fine-grained-ecmp.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests/fine-grained-ecmp.json @@ -14,11 +14,13 @@ }, "FG_NHG_MEMBER_TEST_INVALID_IP": { "desc": "Fine-grained ECMP next-hop member configuration with invalid IP value in FG_NHG_MEMBER_LIST table.", - "eStr": "Invalid value .* next_hop_ip" + "eStrKey" : "InvalidValue", + "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.", - "eStr": "Invalid value .* ip_prefix" + "eStrKey" : "InvalidValue", + "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.", diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/fine_grained_ecmp.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/fine_grained_ecmp.json index 2e0329d79229..dc9a10d69e33 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/fine_grained_ecmp.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/fine_grained_ecmp.json @@ -19,7 +19,7 @@ }, "FG_NHG_PREFIX_TEST": { "sonic-fine-grained-ecmp:sonic-fine-grained-ecmp": { - "sonic-fine-grained-ecmp:FG_NHG_PREFIX": { + "sonic-fine-grained-ecmp:FG_NHG": { "FG_NHG_LIST": [ { "name": "group1", @@ -31,7 +31,9 @@ "bucket_size": 20, "match_mode": "route-based" } - ], + ] + }, + "sonic-fine-grained-ecmp:FG_NHG_PREFIX": { "FG_NHG_PREFIX_LIST": [ { "ip_prefix": "10.0.0.0/24", @@ -47,7 +49,7 @@ }, "FG_NHG_MEMBER_TEST": { "sonic-fine-grained-ecmp:sonic-fine-grained-ecmp": { - "sonic-fine-grained-ecmp:FG_NHG_MEMBER": { + "sonic-fine-grained-ecmp:FG_NHG": { "FG_NHG_LIST": [ { "name": "group1", @@ -59,7 +61,9 @@ "bucket_size": 20, "match_mode": "route-based" } - ], + ] + }, + "sonic-fine-grained-ecmp:FG_NHG_MEMBER": { "FG_NHG_MEMBER_LIST": [ { "next_hop_ip": "10.0.0.1", @@ -143,18 +147,6 @@ "FG_NHG_PREFIX_TEST_MISSING_FG_NHG_REF": { "sonic-fine-grained-ecmp:sonic-fine-grained-ecmp": { "sonic-fine-grained-ecmp:FG_NHG_PREFIX": { - "FG_NHG_LIST": [ - { - "name": "group1", - "bucket_size": 10, - "match_mode": "nexthop-based" - }, - { - "name": "group2", - "bucket_size": 20, - "match_mode": "route-based" - } - ], "FG_NHG_PREFIX_LIST": [ { "ip_prefix": "10.0.0.0/24" @@ -166,18 +158,6 @@ "FG_NHG_MEMBER_TEST_MISSING_BANK": { "sonic-fine-grained-ecmp:sonic-fine-grained-ecmp": { "sonic-fine-grained-ecmp:FG_NHG_MEMBER": { - "FG_NHG_LIST": [ - { - "name": "group1", - "bucket_size": 10, - "match_mode": "nexthop-based" - }, - { - "name": "group2", - "bucket_size": 20, - "match_mode": "route-based" - } - ], "FG_NHG_MEMBER_LIST": [ { "next_hop_ip": "10.0.0.1",