aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSusant Sahani <ssahani@gmail.com>2018-12-02 20:29:13 +0530
committerSusant Sahani <ssahani@gmail.com>2018-12-03 09:16:06 +0530
commitd0e728b6cdba9148e251c3fa7c29e067168c1535 (patch)
tree410ee59dc713dd90021209c75d07a400503786d8 /test
parentnetworkd: Add support to configure ISATAP tunnel (diff)
downloadsystemd-d0e728b6cdba9148e251c3fa7c29e067168c1535.tar.gz
systemd-d0e728b6cdba9148e251c3fa7c29e067168c1535.tar.bz2
systemd-d0e728b6cdba9148e251c3fa7c29e067168c1535.zip
test-network: add test for ISATAP
Diffstat (limited to 'test')
-rw-r--r--test/test-network/conf/25-isatap-tunnel.netdev8
-rw-r--r--test/test-network/conf/isatap.network5
-rwxr-xr-xtest/test-network/systemd-networkd-tests.py14
3 files changed, 25 insertions, 2 deletions
diff --git a/test/test-network/conf/25-isatap-tunnel.netdev b/test/test-network/conf/25-isatap-tunnel.netdev
new file mode 100644
index 000000000..3aa882a26
--- /dev/null
+++ b/test/test-network/conf/25-isatap-tunnel.netdev
@@ -0,0 +1,8 @@
+[NetDev]
+Name=isataptun99
+Kind=sit
+
+[Tunnel]
+Local=10.65.223.238
+Remote=10.65.223.239
+ISATAP=true
diff --git a/test/test-network/conf/isatap.network b/test/test-network/conf/isatap.network
new file mode 100644
index 000000000..e8d03ed6b
--- /dev/null
+++ b/test/test-network/conf/isatap.network
@@ -0,0 +1,5 @@
+[Match]
+Name=dummy98
+
+[Network]
+Tunnel=isataptun99
diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py
index 806f4a496..aeedb6550 100755
--- a/test/test-network/systemd-networkd-tests.py
+++ b/test/test-network/systemd-networkd-tests.py
@@ -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()