mirror of
https://github.com/systemd/systemd.git
synced 2025-01-11 09:18:07 +03:00
test-network: add test for ISATAP
This commit is contained in:
parent
918049ad53
commit
d0e728b6cd
8
test/test-network/conf/25-isatap-tunnel.netdev
Normal file
8
test/test-network/conf/25-isatap-tunnel.netdev
Normal file
@ -0,0 +1,8 @@
|
||||
[NetDev]
|
||||
Name=isataptun99
|
||||
Kind=sit
|
||||
|
||||
[Tunnel]
|
||||
Local=10.65.223.238
|
||||
Remote=10.65.223.239
|
||||
ISATAP=true
|
5
test/test-network/conf/isatap.network
Normal file
5
test/test-network/conf/isatap.network
Normal file
@ -0,0 +1,5 @@
|
||||
[Match]
|
||||
Name=dummy98
|
||||
|
||||
[Network]
|
||||
Tunnel=isataptun99
|
@ -166,7 +166,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
|
||||
'macvlan99', 'ipvlan99', 'vxlan99', 'veth99', 'vrf99', 'tun99',
|
||||
'tap99', 'vcan99', 'geneve99', 'dummy98', 'ipiptun99', 'sittun99', '6rdtun99',
|
||||
'gretap99', 'vtitun99', 'vti6tun99','ip6tnl99', 'gretun99', 'ip6gretap99',
|
||||
'wg99', 'dropin-test', 'erspan-test']
|
||||
'wg99', 'dropin-test', 'erspan-test', 'isataptun99']
|
||||
|
||||
units = ['25-bridge.netdev', '25-bond.netdev', '21-vlan.netdev', '11-dummy.netdev', '21-vlan.network',
|
||||
'21-macvtap.netdev', 'macvtap.network', '21-macvlan.netdev', 'macvlan.network', 'vxlan.network',
|
||||
@ -176,7 +176,8 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
|
||||
'25-erspan-tunnel.netdev', '25-gre-tunnel.netdev', '25-gretap-tunnel.netdev', '25-vti-tunnel.netdev',
|
||||
'25-vti6-tunnel.netdev', '12-dummy.netdev', 'gre.network', 'ipip.network', 'ip6gretap.network',
|
||||
'gretun.network', 'ip6tnl.network', '25-tap.netdev', 'vti6.network', 'vti.network', 'gretap.network',
|
||||
'sit.network', '25-ipip-tunnel-independent.netdev', '25-wireguard.netdev', '6rd.network', '10-dropin-test.netdev']
|
||||
'sit.network', '25-ipip-tunnel-independent.netdev', '25-wireguard.netdev', '6rd.network', '10-dropin-test.netdev',
|
||||
'25-isatap-tunnel.netdev', 'isatap.network']
|
||||
|
||||
def setUp(self):
|
||||
self.link_remove(self.links)
|
||||
@ -389,6 +390,15 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
|
||||
self.assertTrue(self.link_exits('dummy98'))
|
||||
self.assertTrue(self.link_exits('sittun99'))
|
||||
|
||||
def test_isatap_tunnel(self):
|
||||
self.copy_unit_to_networkd_unit_path('12-dummy.netdev', '25-isatap-tunnel.netdev', 'isatap.network')
|
||||
self.start_networkd()
|
||||
|
||||
self.assertTrue(self.link_exits('dummy98'))
|
||||
self.assertTrue(self.link_exits('isataptun99'))
|
||||
output = subprocess.check_output(['ip', '-d', 'link', 'show', 'isataptun99']).rstrip().decode('utf-8')
|
||||
self.assertRegex(output, "isatap ")
|
||||
|
||||
def test_6rd_tunnel(self):
|
||||
self.copy_unit_to_networkd_unit_path('12-dummy.netdev', '25-6rd-tunnel.netdev', '6rd.network')
|
||||
self.start_networkd()
|
||||
|
Loading…
Reference in New Issue
Block a user