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

[action] [PR:9542] Restore the MAC address of VLAN at the end of test_host_vlan #9682

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

mssonicbld
Copy link
Collaborator

Description of PR

Summary:
This PR is to fix a code bug in test_host_vlan.py.
The fixture setup_host_vlan_intf_mac changed the MAC address of Vlan1000 but didn't restore it.
That results in test failure in test_interfaces.py

 def verify_mac_address(host_facts, intfs, router_mac):
 for intf in intfs:
 if 'attachto' in intf:
 ifname = intf['attachto']
 else:
 ifname = intf['name']
 
 pytest_assert(host_facts[ifname]['macaddress'].lower() == router_mac.lower(), \
> "interface {} mac address {} does not match router mac {}".format(ifname, host_facts[ifname]['macaddress'], router_mac))
E Failed: interface Vlan1000 mac address 1c:34:da:bb:84:ff does not match router mac 1c:34:da:bb:84:00

This PR fixed the issue by restoring the MAC address in the teardown of fixture setup_host_vlan_intf_mac.

Type of change

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

Back port request

  • 201911
  • 202012
  • 202205
  • 202305

Approach

What is the motivation for this PR?

This PR is to fix a code bug in test_host_vlan.py.

How did you do it?

This PR fixed the issue by restoring the MAC address in the teardown of fixture setup_host_vlan_intf_mac.

How did you verify/test it?

The change is verified on a SN4600 testbed. The MAC address of Vlan1000 is restored after test running.

Any platform specific information?

No.

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

Not a new test case.

Documentation

@mssonicbld
Copy link
Collaborator Author

Original PR: #9542

@mssonicbld mssonicbld merged commit 2c0f056 into sonic-net:202305 Aug 28, 2023
11 checks passed
@mssonicbld mssonicbld deleted the cherry/202305/9542 branch February 4, 2024 09:27
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.

2 participants