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

snappi_tests:multidut: Tests should skip, not abort or fail if the required multidut or single dut entry is not present in variables.py #14853

Open
rraghav-cisco opened this issue Oct 7, 2024 · 0 comments

Comments

@rraghav-cisco
Copy link
Contributor

Issue Description

@selldinesh ,

If the variables.py doesn't have required entry for multidut or singledut, the corresponding script/test should return skip, not fail or abort. Its better to move such checks to a common fixture rather than checking in every testcase as below:

>           pytest_assert(len(rdma_ports['tx_ports']) >= tx_port_count,
                          'MULTIDUT_PORT_INFO doesn\'t have the required Tx ports defined for \
                          testbed {}, subtype {} in variables.py'.
                          format(MULTIDUT_TESTBED, testbed_subtype))
E           Failed: MULTIDUT_PORT_INFO doesn't have the required Tx ports defined for                       testbed ixia-sonic2, subtype multi-dut-single-asic in variables.py

conn_graph_facts = {'device_bmc_info': {'rdma-m64': {}}, 'device_bmc_link': {'rdma-m64': {}}, 'device_conn': {'rdma-m64': {'Ethernet0': {...erdevice': 'ixia-sonic', 'peerport': 'Card5/Port6', 'speed': '100000'}}}, 'device_console_info': {'rdma-m64': {}}, ...}
duthosts   = [<MultiAsicSonicHost rdma-m64>]
fanout_graph_facts_multidut = {'ixia-sonic': {'device_bmc_info': {}, 'device_bmc_link': {}, 'device_conn': {'Card5/Port4': {'peerdevice': 'rdma-m64'...rd5/Port8': {'peerdevice': 'rdma-m64', 'peerport': 'Ethernet192', 'speed': '100000'}}, 'device_console_info': {}, ...}}
get_snappi_ports = [{'api_server_ip': '172.27.145.51', 'asic_type': 'cisco-8000', 'asic_value': None, 'card_id': '5', ...}, {'api_server_...id': '5', ...}, {'api_server_ip': '172.27.145.51', 'asic_type': 'cisco-8000', 'asic_value': None, 'card_id': '5', ...}]
lossless_prio_list = [3, 4]
multidut_port_info = {'multi-dut-single-asic': {'rx_ports': [], 'tx_ports': []}}
prio_dscp_map = {0: [8], 1: [0, 1, 10, 11, 12, 13, ...], 2: [5], 3: [3], ...}
rdma_ports = {'rx_ports': [], 'tx_ports': []}
request    = <FixtureRequest for <Function test_snappi[multidut_port_info1]>>
rx_port_count = 1
snappi_api = <snappi_ixnetwork.snappi_api.Api object at 0x7f2e6e971f40>
snappi_port_list = [{'api_server_ip': '172.27.145.51', 'asic_type': 'cisco-8000', 'asic_value': None, 'card_id': '5', ...}, {'api_server_...id': '5', ...}, {'api_server_ip': '172.27.145.51', 'asic_type': 'cisco-8000', 'asic_value': None, 'card_id': '5', ...}]
tbinfo     = {'auto_recover': 'False', 'comment': 'rdma-ixia automation testbed.', 'conf-name': 'ixia-sonic2', 'duts': ['rdma-m64'], ...}
testbed_subtype = 'multi-dut-single-asic'
tx_port_count = 1

snappi_tests/test_multidut_snappi.py:122: Failed

Results you see

Failing cases.

Results you expected to see

Skip if unsupported.

Is it platform specific

generic

Relevant log output

Pls see description.

Output of show version

NA

Attach files (if any)

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant