Skip to content

Commit

Permalink
[backend] Fix test_vlan (#4715)
Browse files Browse the repository at this point in the history
Approach
What is the motivation for this PR?

Fix test_vlan cases errored on t0-backend topo
```
>       assert portchannel_cnt == pc_num, 'Need 2 portchannels for test'
E       UnboundLocalError: local variable 'portchannel_cnt' referenced before assignment
```
  • Loading branch information
lolyu authored Nov 17, 2021
1 parent 69daa5f commit a82d09d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/vlan/test_vlan.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def work_vlan_ports_list(rand_selected_dut, tbinfo, cfg_facts, ports_list, utils
vlan_port['permit_vlanid'] = vlan_id_list[:]
if 'pvid' in vlan_port:
work_vlan_ports_list.append(vlan_port)
assert portchannel_cnt == pc_num, 'Need 2 portchannels for test'
assert portchannel_cnt == pc_num, 'Need 2 portchannels for test'

for i, port in enumerate(ports_list):
vlan_port = {
Expand Down

0 comments on commit a82d09d

Please sign in to comment.