Skip to content

Commit

Permalink
[pc]: Skip if there's not enough members in the VLAN (sonic-net#13211)
Browse files Browse the repository at this point in the history
What is the motivation for this PR?
For the t0-8-lag topology, there are only 15 interfaces in the VLAN that will be up. This means that for topos where we want to test 16-member LAGs, this will be impossible.

How did you do it?
As a general fix, if there's not enough members in the VLAN, skip the test case. This was already being done in one place, but that line of code just needed to be copied to another fixture.

Signed-off-by: Saikrishna Arcot <[email protected]>
  • Loading branch information
saiarcot895 authored Jun 13, 2024
1 parent be348b3 commit cba7a8e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/pc/test_lag_member.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ def most_common_port_speed(duthost):
port_status = cfg_facts["PORT"]
number_of_lag_member = HWSKU_INTF_NUMBERS_DICT.get(duthost.facts["hwsku"], DEAFULT_NUMBER_OF_MEMBER_IN_LAG)
src_vlan_id = get_vlan_id(cfg_facts, number_of_lag_member)
pytest_require(src_vlan_id != -1, "Can't get usable vlan concluding enough member")
src_vlan_members = cfg_facts["VLAN_MEMBER"]["Vlan{}".format(src_vlan_id)]
# specific LAG interface from t0-56-po2vlan topo, which can't be tested
src_vlan_members.pop('PortChannel201', None)
Expand Down

0 comments on commit cba7a8e

Please sign in to comment.