summaryrefslogtreecommitdiff
path: root/test/test-network
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2019-06-17 10:52:16 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2019-06-18 12:45:19 +0900
commit35a78c513131b681dbd0ec1507be9804251418c5 (patch)
tree4faa46339e0f7660f993e4f3b079a2159a6b47e6 /test/test-network
parent8d17c386d7a354582cfa1b759155f82c4a81881a (diff)
downloadsystemd-35a78c513131b681dbd0ec1507be9804251418c5.tar.gz
test-network: use wait-online in NetworkdBondTests
Diffstat (limited to 'test/test-network')
-rw-r--r--test/test-network/conf/23-test1-bond199.network6
-rwxr-xr-xtest/test-network/systemd-networkd-tests.py24
2 files changed, 8 insertions, 22 deletions
diff --git a/test/test-network/conf/23-test1-bond199.network b/test/test-network/conf/23-test1-bond199.network
deleted file mode 100644
index 6e7c28dfe7..0000000000
--- a/test/test-network/conf/23-test1-bond199.network
+++ /dev/null
@@ -1,6 +0,0 @@
-[Match]
-Name=test1
-
-[Network]
-Bond=bond199
-PrimarySlave=true
diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py
index 2f2b711888..76481d45e9 100755
--- a/test/test-network/systemd-networkd-tests.py
+++ b/test/test-network/systemd-networkd-tests.py
@@ -1684,7 +1684,6 @@ class NetworkdBondTests(unittest.TestCase, Utilities):
'23-active-slave.network',
'23-bond199.network',
'23-primary-slave.network',
- '23-test1-bond199.network',
'25-bond-active-backup-slave.netdev',
'25-bond.netdev',
'bond99.network',
@@ -1699,34 +1698,27 @@ class NetworkdBondTests(unittest.TestCase, Utilities):
def test_bond_active_slave(self):
copy_unit_to_networkd_unit_path('23-active-slave.network', '23-bond199.network', '25-bond-active-backup-slave.netdev', '12-dummy.netdev')
- start_networkd()
-
- self.check_link_exists('dummy98')
- self.check_link_exists('bond199')
+ start_networkd(0)
+ wait_online(['dummy98:enslaved', 'bond199:degraded'])
output = check_output('ip -d link show bond199')
print(output)
self.assertRegex(output, 'active_slave dummy98')
def test_bond_primary_slave(self):
- copy_unit_to_networkd_unit_path('23-primary-slave.network', '23-test1-bond199.network', '25-bond-active-backup-slave.netdev', '11-dummy.netdev')
- start_networkd()
-
- self.check_link_exists('test1')
- self.check_link_exists('bond199')
+ copy_unit_to_networkd_unit_path('23-primary-slave.network', '23-bond199.network', '25-bond-active-backup-slave.netdev', '12-dummy.netdev')
+ start_networkd(0)
+ wait_online(['dummy98:enslaved', 'bond199:degraded'])
output = check_output('ip -d link show bond199')
print(output)
- self.assertRegex(output, 'primary test1')
+ self.assertRegex(output, 'primary dummy98')
def test_bond_operstate(self):
copy_unit_to_networkd_unit_path('25-bond.netdev', '11-dummy.netdev', '12-dummy.netdev',
'bond99.network','bond-slave.network')
- start_networkd()
-
- self.check_link_exists('bond99')
- self.check_link_exists('dummy98')
- self.check_link_exists('test1')
+ start_networkd(0)
+ wait_online(['dummy98:enslaved', 'test1:enslaved', 'bond99:routable'])
output = check_output('ip -d link show dummy98')
print(output)