Skip to content

Use pytest.fail() for vlan non-broadcast tests#2844

Merged
wangxin merged 1 commit intosonic-net:masterfrom
vcheketx:fix_vlan_non_broadcast_fail_method
Jan 29, 2021
Merged

Use pytest.fail() for vlan non-broadcast tests#2844
wangxin merged 1 commit intosonic-net:masterfrom
vcheketx:fix_vlan_non_broadcast_fail_method

Conversation

@vcheketx
Copy link
Copy Markdown
Contributor

Description of PR

Summary:
Use correct fail method for vlan non-broadcast tests, added in #2663

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

What is the motivation for this PR?

test_vlan_tc4_tagged_non_broadcast and test_vlan_tc5_untagged_non_broadcast fail with incorrect error message if we do not receive expected packet.
Expected result:

        if isinstance(result_dst_if, ptfadapter.dataplane.PollSuccess):
            logger.info ("One Way Tagged Packet Transmission Works")
            logger.info ("Tagged packet successfully sent from port {} to port {}".format(src_port, dst_port))
        else:
>           test.fail("Expected packet was not received")
E           Failed: Expected packet was not received

Actual result:

        if isinstance(result_dst_if, ptfadapter.dataplane.PollSuccess):
            logger.info ("One Way Tagged Packet Transmission Works")
            logger.info ("Tagged packet successfully sent from port {} to port {}".format(src_port, dst_port))
        else:
>           test.fail("Expected packet was not received")
E           NameError: global name 'test' is not defined

How did you do it?

Use pytest.fail() instead of test.fail()

How did you verify/test it?

Run test_vlan.py

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@wangxin wangxin merged commit 686dced into sonic-net:master Jan 29, 2021
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…AD (sonic-net#15532)

#### Why I did it
Update submodule sonic-utilities to the latest HEAD
```
50296b90 - [202012][dhcp-relay] Fix dhcp6relay counter issue (sonic-net#2866) (sonic-net#2873) (Fri Jun 30 18:08:53 2023 +0800) <Yaqiang Zhu>
160030c4 - [202012][dhcp_relay] Add "Reconfigure", "Information-Request", "Malformed" counter options (sonic-net#2844) (Sun Jun 11 20:35:30 2023 -0700) <kellyyeh>
e6289ced - [vlan][dhcp_relay] Clear dhcpv6 relay counter while deleting vlan (sonic-net#2852) (Fri Jun 2 18:20:21 2023 +0000) <Yaqiang Zhu>
885082ec - correctly parsing complete ipv6 vnet info (sonic-net#2827) (Thu May 25 06:01:40 2023 +0000) <Keith Lu>
```

##### Work item tracking
- Microsoft ADO 22635770
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants