diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-03-08 04:34:56 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-03-11 15:29:19 +0100 |
commit | 7f45d738a62e308cdd2c7f45b0adfa1ee59b8554 (patch) | |
tree | 6214095d2956f7bee0005dfd13e92ca6e7e7160c /test/test-network/systemd-networkd-tests.py | |
parent | machinectl: do not format size if freed disk space is "-1" (diff) | |
download | systemd-7f45d738a62e308cdd2c7f45b0adfa1ee59b8554.tar.xz systemd-7f45d738a62e308cdd2c7f45b0adfa1ee59b8554.zip |
test-network: add tests for issue #11921
Diffstat (limited to '')
-rwxr-xr-x | test/test-network/systemd-networkd-tests.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index 757e6da657..856960ad65 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -214,6 +214,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities): '12-dummy.netdev', '21-macvlan.netdev', '21-macvtap.netdev', + '21-vlan-test1.network', '21-vlan.netdev', '21-vlan.network', '25-6rd-tunnel.netdev', @@ -341,7 +342,8 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities): self.assertEqual('1', self.read_link_attr('bond99', 'bonding', 'tlb_dynamic_lb')) def test_vlan(self): - self.copy_unit_to_networkd_unit_path('21-vlan.netdev', '11-dummy.netdev', '21-vlan.network') + self.copy_unit_to_networkd_unit_path('21-vlan.netdev', '11-dummy.netdev', + '21-vlan.network', '21-vlan-test1.network') self.start_networkd() self.assertTrue(self.link_exits('test1')) @@ -360,6 +362,15 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities): self.assertTrue(output, 'MVRP') self.assertTrue(output, ' id 99 ') + output = subprocess.check_output(['ip', '-4', 'address', 'show', 'dev', 'test1']).rstrip().decode('utf-8') + print(output) + self.assertRegex(output, 'inet 192.168.24.5/24 brd 192.168.24.255 scope global test1') + self.assertRegex(output, 'inet 192.168.25.5/24 brd 192.168.25.255 scope global test1') + + output = subprocess.check_output(['ip', '-4', 'address', 'show', 'dev', 'vlan99']).rstrip().decode('utf-8') + print(output) + self.assertRegex(output, 'inet 192.168.23.5/24 brd 192.168.23.255 scope global vlan99') + def test_macvtap(self): self.copy_unit_to_networkd_unit_path('21-macvtap.netdev', '11-dummy.netdev', 'macvtap.network') self.start_networkd() |