diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-11-20 19:43:32 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-11-20 19:43:35 +0100 |
commit | 2b397d43ab0fac0ec745bee128b6f352b8f44029 (patch) | |
tree | baeae23df50d5795d96fde1830545c9299caa703 /test | |
parent | network: update state files before replying bus method (diff) | |
download | systemd-2b397d43ab0fac0ec745bee128b6f352b8f44029.tar.xz systemd-2b397d43ab0fac0ec745bee128b6f352b8f44029.zip |
test-network: actually check metric and preference
Otherwise, nexthop ID may contain e.g. 300, then
===
AssertionError: '300' unexpectedly found in
'default nhid 3860882700 via fe80::1034:56ff:fe78:9a99 proto ra metric 512 expires 1798sec pref high\n
default nhid 2639230080 via fe80::1034:56ff:fe78:9a98 proto ra metric 2048 expires 1798sec pref low'
===
Diffstat (limited to 'test')
-rwxr-xr-x | test/test-network/systemd-networkd-tests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index 462d40d839..215f3cb1cc 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -6406,11 +6406,11 @@ class NetworkdRATests(unittest.TestCase, Utilities): for i in [100, 200, 300, 512, 1024, 2048]: if i not in [metric_1, metric_2]: - self.assertNotIn(f'{i}', output) + self.assertNotIn(f'metric {i} ', output) for i in ['low', 'medium', 'high']: if i not in [preference_1, preference_2]: - self.assertNotIn(f'{i}', output) + self.assertNotIn(f'pref {i}', output) def test_router_preference(self): copy_network_unit('25-veth-client.netdev', |