Skip to content

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

Merged
mssonicbld merged 1 commit intosonic-net:202012from
mssonicbld:cherry/202012/9542
Aug 28, 2023
Merged

[action] [PR:9542] Restore the MAC address of VLAN at the end of test_host_vlan#9681
mssonicbld merged 1 commit intosonic-net:202012from
mssonicbld:cherry/202012/9542

Conversation

@mssonicbld
Copy link
Copy Markdown
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
Copy Markdown
Collaborator Author

Original PR: #9542

@mssonicbld mssonicbld merged commit 5cb1161 into sonic-net:202012 Aug 28, 2023
@mssonicbld mssonicbld deleted the cherry/202012/9542 branch February 4, 2024 09:02
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