Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix acl/test_stress_acl.py invalid interface name #15796

Merged
merged 3 commits into from
Dec 19, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions tests/acl/test_stress_acl.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,15 @@ def prepare_test_file(rand_selected_dut):
@pytest.fixture(scope='module')
def prepare_test_port(rand_selected_dut, tbinfo):
mg_facts = rand_selected_dut.get_extended_minigraph_facts(tbinfo)
if tbinfo["topo"]["type"] == "mx":
dut_port = mg_facts["minigraph_acls"]["DataAcl"][0]
else:
dut_port = list(mg_facts['minigraph_portchannels'].keys())[0]

ports = list(mg_facts['minigraph_portchannels'])
if tbinfo["topo"]["type"] != "dualtor" and not ports:
ports = mg_facts["minigraph_acls"]["DataAcl"]

dut_port = ports[0] if ports else None

if not dut_port:
pytest.skip('No portchannels found')
pytest.skip('No portchannels available in dualtor topo or no interfaces found on DUT')
if "Ethernet" in dut_port:
dut_eth_port = dut_port
elif "PortChannel" in dut_port:
Expand Down
Loading