diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/TEST-16-EXTEND-TIMEOUT/testsuite.service | 2 | ||||
-rwxr-xr-x | test/test-network/systemd-networkd-tests.py | 46 |
2 files changed, 24 insertions, 24 deletions
diff --git a/test/TEST-16-EXTEND-TIMEOUT/testsuite.service b/test/TEST-16-EXTEND-TIMEOUT/testsuite.service index e1cd5caeea..7512ba9e12 100644 --- a/test/TEST-16-EXTEND-TIMEOUT/testsuite.service +++ b/test/TEST-16-EXTEND-TIMEOUT/testsuite.service @@ -12,7 +12,7 @@ Wants=testsuite-fail-runtime.service StopWhenUnneeded=yes [Service] - Type=simple +TimeoutStartSec=infinity ExecStartPre=/assess.sh ExecStart=/bin/true diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index d9db9c1657..843125ee65 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -443,16 +443,16 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities): output = subprocess.check_output(['ip', '-d', 'link', 'show', 'test1']).rstrip().decode('utf-8') print(output) - self.assertTrue(output, ' mtu 2004 ') + self.assertRegex(output, ' mtu 2004 ') output = subprocess.check_output(['ip', '-d', 'link', 'show', 'vlan99']).rstrip().decode('utf-8') print(output) - self.assertTrue(output, ' mtu 2000 ') - self.assertTrue(output, 'REORDER_HDR') - self.assertTrue(output, 'LOOSE_BINDING') - self.assertTrue(output, 'GVRP') - self.assertTrue(output, 'MVRP') - self.assertTrue(output, ' id 99 ') + self.assertRegex(output, ' mtu 2000 ') + self.assertRegex(output, 'REORDER_HDR') + self.assertRegex(output, 'LOOSE_BINDING') + self.assertRegex(output, 'GVRP') + self.assertRegex(output, 'MVRP') + self.assertRegex(output, ' id 99 ') output = subprocess.check_output(['ip', '-4', 'address', 'show', 'dev', 'test1']).rstrip().decode('utf-8') print(output) @@ -478,11 +478,11 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities): output = subprocess.check_output(['ip', '-d', 'link', 'show', 'test1']).rstrip().decode('utf-8') print(output) - self.assertTrue(output, ' mtu 2000 ') + self.assertRegex(output, ' mtu 2000 ') output = subprocess.check_output(['ip', '-d', 'link', 'show', 'macvlan99']).rstrip().decode('utf-8') print(output) - self.assertTrue(output, ' mtu 2000 ') + self.assertRegex(output, ' mtu 2000 ') @expectedFailureIfModuleIsNotAvailable('ipvlan') def test_ipvlan(self): @@ -544,24 +544,24 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities): subprocess.call('wg') output = subprocess.check_output(['wg', 'show', 'wg99', 'listen-port']).rstrip().decode('utf-8') - self.assertTrue(output, '51820') + self.assertRegex(output, '51820') output = subprocess.check_output(['wg', 'show', 'wg99', 'fwmark']).rstrip().decode('utf-8') - self.assertTrue(output, '0x4d2') + self.assertRegex(output, '0x4d2') output = subprocess.check_output(['wg', 'show', 'wg99', 'allowed-ips']).rstrip().decode('utf-8') - self.assertTrue(output, 'RDf+LSpeEre7YEIKaxg+wbpsNV7du+ktR99uBEtIiCA=\t192.168.26.0/24 fd31:bf08:57cb::/48') - self.assertTrue(output, 'lsDtM3AbjxNlauRKzHEPfgS1Zp7cp/VX5Use/P4PQSc=\tfdbc:bae2:7871:e1fe:793:8636::/96 fdbc:bae2:7871:500:e1fe:793:8636:dad1/128') + self.assertRegex(output, 'RDf\+LSpeEre7YEIKaxg\+wbpsNV7du\+ktR99uBEtIiCA=\t192.168.26.0/24 fd31:bf08:57cb::/48') + self.assertRegex(output, 'lsDtM3AbjxNlauRKzHEPfgS1Zp7cp/VX5Use/P4PQSc=\tfdbc:bae2:7871:e1fe:793:8636::/96 fdbc:bae2:7871:500:e1fe:793:8636:dad1/128') output = subprocess.check_output(['wg', 'show', 'wg99', 'persistent-keepalive']).rstrip().decode('utf-8') - self.assertTrue(output, 'RDf+LSpeEre7YEIKaxg+wbpsNV7du+ktR99uBEtIiCA=\t20') + self.assertRegex(output, 'RDf\+LSpeEre7YEIKaxg\+wbpsNV7du\+ktR99uBEtIiCA=\t20') output = subprocess.check_output(['wg', 'show', 'wg99', 'endpoints']).rstrip().decode('utf-8') - self.assertTrue(output, 'RDf+LSpeEre7YEIKaxg+wbpsNV7du+ktR99uBEtIiCA=\t192.168.27.3:51820') + self.assertRegex(output, 'RDf\+LSpeEre7YEIKaxg\+wbpsNV7du\+ktR99uBEtIiCA=\t192.168.27.3:51820') output = subprocess.check_output(['wg', 'show', 'wg99', 'private-key']).rstrip().decode('utf-8') - self.assertTrue(output, 'EEGlnEPYJV//kbvvIqxKkQwOiS+UENyPncC4bF46ong=') + self.assertRegex(output, 'EEGlnEPYJV//kbvvIqxKkQwOiS\+UENyPncC4bF46ong=') output = subprocess.check_output(['wg', 'show', 'wg99', 'preshared-keys']).rstrip().decode('utf-8') - self.assertTrue(output, 'RDf+LSpeEre7YEIKaxg+wbpsNV7du+ktR99uBEtIiCA= IIWIV17wutHv7t4cR6pOT91z6NSz/T8Arh0yaywhw3M=') - self.assertTrue(output, 'lsDtM3AbjxNlauRKzHEPfgS1Zp7cp/VX5Use/P4PQSc= cPLOy1YUrEI0EMMIycPJmOo0aTu3RZnw8bL5meVD6m0=') + self.assertRegex(output, 'RDf\+LSpeEre7YEIKaxg\+wbpsNV7du\+ktR99uBEtIiCA= IIWIV17wutHv7t4cR6pOT91z6NSz/T8Arh0yaywhw3M=') + self.assertRegex(output, 'lsDtM3AbjxNlauRKzHEPfgS1Zp7cp/VX5Use/P4PQSc= cPLOy1YUrEI0EMMIycPJmOo0aTu3RZnw8bL5meVD6m0=') output = subprocess.check_output(['wg', 'show', 'wg98', 'private-key']).rstrip().decode('utf-8') - self.assertTrue(output, 'CJQUtcS9emY2fLYqDlpSZiE/QJyHkPWr+WHtZLZ90FU=') + self.assertRegex(output, 'CJQUtcS9emY2fLYqDlpSZiE/QJyHkPWr\+WHtZLZ90FU=') def test_geneve(self): self.copy_unit_to_networkd_unit_path('25-geneve.netdev') @@ -571,10 +571,10 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities): output = subprocess.check_output(['ip', '-d', 'link', 'show', 'geneve99']).rstrip().decode('utf-8') print(output) - self.assertTrue(output, '192.168.22.1') - self.assertTrue(output, '6082') - self.assertTrue(output, 'udpcsum') - self.assertTrue(output, 'udp6zerocsumrx') + self.assertRegex(output, '192.168.22.1') + self.assertRegex(output, '6082') + self.assertRegex(output, 'udpcsum') + self.assertRegex(output, 'udp6zerocsumrx') def test_ipip_tunnel(self): self.copy_unit_to_networkd_unit_path('12-dummy.netdev', '25-ipip-tunnel.netdev', 'ipip.network', |