test-network: add a test case for [IPv6Prefix] Assign=yes

This commit is contained in:
Yu Watanabe 2020-03-01 00:46:56 +09:00
parent a781ddefe5
commit 3c874fd79d
2 changed files with 11 additions and 3 deletions

View File

@ -4,10 +4,13 @@ Name=veth99
[Network]
DHCP=no
IPv6PrefixDelegation=yes
Address=2001:db8:0:1::1/64
[IPv6Prefix]
Prefix=2001:db8:0:1::4/64
Prefix=2001:db8:0:1::/64
[IPv6Prefix]
Prefix=2001:db8:0:2::/64
Assign=yes
[IPv6RoutePrefix]
Route=2001:db0:fff::/64

View File

@ -3575,10 +3575,15 @@ class NetworkdIPv6PrefixTests(unittest.TestCase, Utilities):
start_networkd()
self.wait_online(['veth99:routable', 'veth-peer:routable'])
output = check_output('ip', '-6', 'route', 'show', 'dev', 'veth-peer')
output = check_output('ip -6 route show dev veth-peer')
print(output)
self.assertRegex(output, '2001:db8:0:1::/64 proto ra')
output = check_output('ip addr show dev veth99')
print(output)
self.assertNotRegex(output, '2001:db8:0:1')
self.assertRegex(output, '2001:db8:0:2')
class NetworkdMTUTests(unittest.TestCase, Utilities):
links = ['dummy98']