Skip to content

Commit 2cd0968

Browse files
committed
Fix unit test failed
1 parent 71abd79 commit 2cd0968

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/vlan_test.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
"table": "DHCP_RELAY"
2020
}
2121
}
22-
DHCP_RELAY_TABLE_ENTRY = {
23-
"vlanid": "1001"
24-
}
2522

2623
show_vlan_brief_output="""\
2724
+-----------+-----------------+-----------------+----------------+-------------+
@@ -610,7 +607,8 @@ def test_config_add_del_vlan_dhcp_relay(self, ip_version, mock_restart_dhcp_rela
610607
print(result.output)
611608
assert result.exit_code == 0
612609

613-
assert db.cfgdb.get_entry(IP_VERSION_PARAMS_MAP[ip_version]["table"], "Vlan1001") == DHCP_RELAY_TABLE_ENTRY
610+
exp_output = {"vlanid": "1001"} if ip_version == "ipv4" else {}
611+
assert db.cfgdb.get_entry(IP_VERSION_PARAMS_MAP[ip_version]["table"], "Vlan1001") == exp_output
614612

615613
# del vlan 1001
616614
result = runner.invoke(config.config.commands["vlan"].commands["del"], ["1001"], obj=db)

0 commit comments

Comments
 (0)