Skip to content

Commit b1ae45d

Browse files
Add creation of vlan500 so as to check adding secondary fails
1 parent 4791848 commit b1ae45d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/ip_config_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ def test_add_del_interface_valid_ipv4(self):
149149
assert ('Vlan4000', '10.16.20.1/24') in db.cfgdb.get_table('VLAN_INTERFACE')
150150
assert 'secondary' not in db.cfgdb.get_table('VLAN_INTERFACE')[('Vlan4000', '10.16.20.1/24')]
151151

152+
# create vlan 500
153+
result = runner.invoke(config.config.commands["vlan"].commands["add"], ["500"], obj=db)
152154
# config int ip add vlan500 10.21.20.1/24 as secondary - should fail as vlan500 is not added in table
153155
ERR_MSG = "Error: Primary for the interface Vlan500 is not set, so skipping adding the interface"
154156
result = runner.invoke(config.config.commands["interface"].commands["ip"].commands["add"], ["Vlan500", "10.21.20.1/24", "--secondary"], obj=obj)

0 commit comments

Comments
 (0)