Skip to content

Commit

Permalink
Added skip for test_mgmt_ipv6_only TC if ipv6 mgmt not available
Browse files Browse the repository at this point in the history
  • Loading branch information
SavchukRomanLv committed Jan 2, 2025
1 parent 852bd6b commit fe97526
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/common/fixtures/duthost_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,10 +698,11 @@ def convert_and_restore_config_db_to_ipv6_only(duthosts):
finally:
ssh_client.close()

pytest_assert(len(ipv6_address[duthost.hostname]) > 0,
f"{duthost.hostname} doesn't have IPv6 Management IP address")
pytest_assert(has_available_ipv6_addr,
f"{duthost.hostname} doesn't have available IPv6 Management IP address")
if not ipv6_address[duthost.hostname]:
pytest.skip(f"{duthost.hostname} doesn't have IPv6 Management IP address")
if not has_available_ipv6_addr:
pytest.skip(f"{duthost.hostname} doesn't have available IPv6 Management IP address")


# Remove IPv4 mgmt-ip
for duthost in duthosts.nodes:
Expand Down

0 comments on commit fe97526

Please sign in to comment.