test-network: add tests for IPv6Token=
This commit is contained in:
parent
5f506a5560
commit
87bbebeab6
|
@ -0,0 +1,6 @@
|
|||
[Match]
|
||||
Name=veth99
|
||||
|
||||
[Network]
|
||||
IPv6AcceptRA=true
|
||||
IPv6Token=::1a:2b:3c:4d
|
|
@ -0,0 +1,6 @@
|
|||
[Match]
|
||||
Name=veth99
|
||||
|
||||
[Network]
|
||||
IPv6AcceptRA=true
|
||||
IPv6Token=prefixstable:2002:da8:1::
|
|
@ -2644,7 +2644,9 @@ class NetworkdRATests(unittest.TestCase, Utilities):
|
|||
units = [
|
||||
'25-veth.netdev',
|
||||
'ipv6-prefix.network',
|
||||
'ipv6-prefix-veth.network']
|
||||
'ipv6-prefix-veth.network',
|
||||
'ipv6-prefix-veth-token-eui64.network',
|
||||
'ipv6-prefix-veth-token-prefixstable.network']
|
||||
|
||||
def setUp(self):
|
||||
remove_links(self.links)
|
||||
|
@ -2669,6 +2671,24 @@ class NetworkdRATests(unittest.TestCase, Utilities):
|
|||
print(output)
|
||||
self.assertRegex(output, '2002:da8:1:0')
|
||||
|
||||
def test_ipv6_token_eui64(self):
|
||||
copy_unit_to_networkd_unit_path('25-veth.netdev', 'ipv6-prefix.network', 'ipv6-prefix-veth-token-eui64.network')
|
||||
start_networkd()
|
||||
self.wait_online(['veth99:routable', 'veth-peer:degraded'])
|
||||
|
||||
output = check_output(*networkctl_cmd, '-n', '0', 'status', 'veth99', env=env)
|
||||
print(output)
|
||||
self.assertRegex(output, '2002:da8:1:0:1a:2b:3c:4d')
|
||||
|
||||
def test_ipv6_token_prefixstable(self):
|
||||
copy_unit_to_networkd_unit_path('25-veth.netdev', 'ipv6-prefix.network', 'ipv6-prefix-veth-token-prefixstable.network')
|
||||
start_networkd()
|
||||
self.wait_online(['veth99:routable', 'veth-peer:degraded'])
|
||||
|
||||
output = check_output(*networkctl_cmd, '-n', '0', 'status', 'veth99', env=env)
|
||||
print(output)
|
||||
self.assertRegex(output, '2002:da8:1:0')
|
||||
|
||||
class NetworkdDHCPServerTests(unittest.TestCase, Utilities):
|
||||
links = ['veth99']
|
||||
|
||||
|
|
Loading…
Reference in New Issue