test-network: add a test case for [IPv6Prefix] Assign=yes
This commit is contained in:
parent
a781ddefe5
commit
3c874fd79d
|
@ -4,10 +4,13 @@ Name=veth99
|
||||||
[Network]
|
[Network]
|
||||||
DHCP=no
|
DHCP=no
|
||||||
IPv6PrefixDelegation=yes
|
IPv6PrefixDelegation=yes
|
||||||
Address=2001:db8:0:1::1/64
|
|
||||||
|
|
||||||
[IPv6Prefix]
|
[IPv6Prefix]
|
||||||
Prefix=2001:db8:0:1::4/64
|
Prefix=2001:db8:0:1::/64
|
||||||
|
|
||||||
|
[IPv6Prefix]
|
||||||
|
Prefix=2001:db8:0:2::/64
|
||||||
|
Assign=yes
|
||||||
|
|
||||||
[IPv6RoutePrefix]
|
[IPv6RoutePrefix]
|
||||||
Route=2001:db0:fff::/64
|
Route=2001:db0:fff::/64
|
||||||
|
|
|
@ -3575,10 +3575,15 @@ class NetworkdIPv6PrefixTests(unittest.TestCase, Utilities):
|
||||||
start_networkd()
|
start_networkd()
|
||||||
self.wait_online(['veth99:routable', 'veth-peer:routable'])
|
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)
|
print(output)
|
||||||
self.assertRegex(output, '2001:db8:0:1::/64 proto ra')
|
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):
|
class NetworkdMTUTests(unittest.TestCase, Utilities):
|
||||||
links = ['dummy98']
|
links = ['dummy98']
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue