From 3b3badf7e614fb41243df7286298f8d89730048d Mon Sep 17 00:00:00 2001 From: Cong Hou Date: Fri, 13 May 2022 09:51:51 +0800 Subject: [PATCH] Fix test case: generic_config_updater/test_ipv6.py::test_ipv6_neighbor_admin_change This case fails every time on our community setup because it tries to replace the value of config entry " BGP_NEIGHBOR/fc00::12/admin_status", while this entry doesn't exist in the default running configuratuion.(The admin_status is up by default, but it doesn't show in the configuration.) To fix this, need to add this config before replace it. And add a topology mark for the test according to the description in https://github.com/Azure/sonic-mgmt/pull/5061 . --- tests/generic_config_updater/test_ipv6.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/generic_config_updater/test_ipv6.py b/tests/generic_config_updater/test_ipv6.py index 59f95db7b9b..4ae4795956a 100644 --- a/tests/generic_config_updater/test_ipv6.py +++ b/tests/generic_config_updater/test_ipv6.py @@ -10,6 +10,9 @@ logger = logging.getLogger(__name__) +pytestmark = [ + pytest.mark.topology('t0', 't1'), +] @pytest.fixture(autouse=True) def ensure_dut_readiness(duthost): @@ -153,6 +156,11 @@ def test_invalid_ipv6_neighbor(duthost, ensure_dut_readiness, op, dummy_neighbor def test_ipv6_neighbor_admin_change(duthost): ipv6_neighbor_address, ipv6_neighbor_config = get_ipv6_neighbor(duthost) json_patch = [ + { + "op": "add", + "path": "/BGP_NEIGHBOR/{}/admin_status".format(ipv6_neighbor_address), + "value": "up" + }, { "op": "replace", "path": "/BGP_NEIGHBOR/{}/admin_status".format(ipv6_neighbor_address),