forked from sonic-net/sonic-mgmt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[wol_test] implement tests for wol (sonic-net#14299)
Implement wol test plan: https://github.com/sonic-net/sonic-mgmt/blob/master/docs/testplan/WoL-test-plan.md
- Loading branch information
1 parent
6657387
commit ac37f7f
Showing
3 changed files
with
401 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import pytest | ||
|
||
|
||
@pytest.fixture(scope="module") | ||
def get_connected_dut_intf_to_ptf_index(duthost, tbinfo): | ||
disabled_host_interfaces = tbinfo['topo']['properties']['topology'].get('disabled_host_interfaces', []) | ||
connected_ptf_ports_idx = [interface for interface in | ||
tbinfo['topo']['properties']['topology'].get('host_interfaces', []) | ||
if interface not in disabled_host_interfaces] | ||
dut_intf_to_ptf_index = duthost.get_extended_minigraph_facts(tbinfo)['minigraph_ptf_indices'] | ||
connected_dut_intf_to_ptf_index = [(k, v) for k, v in dut_intf_to_ptf_index.items() if v in connected_ptf_ports_idx] | ||
|
||
yield connected_dut_intf_to_ptf_index |
Oops, something went wrong.