Skip to content

Commit

Permalink
Fix test case: generic_config_updater/test_ipv6.py::test_ipv6_neighbo…
Browse files Browse the repository at this point in the history
…r_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 sonic-net#5061 .
  • Loading branch information
congh-nvidia committed May 13, 2022
1 parent b2cc638 commit 3b3badf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/generic_config_updater/test_ipv6.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

logger = logging.getLogger(__name__)

pytestmark = [
pytest.mark.topology('t0', 't1'),
]

@pytest.fixture(autouse=True)
def ensure_dut_readiness(duthost):
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit 3b3badf

Please sign in to comment.