]> git.ipfire.org Git - people/jschlag/network.git/commitdiff
Nitsi: Add test for port bonding master
authorJonatan Schlag <jonatan.schlag@ipfire.org>
Tue, 18 Sep 2018 19:48:08 +0000 (21:48 +0200)
committerJonatan Schlag <jonatan.schlag@ipfire.org>
Tue, 18 Sep 2018 19:48:08 +0000 (21:48 +0200)
Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Makefile.am
test/nitsi/test/port-bonding/recipe [new file with mode: 0644]
test/nitsi/test/port-bonding/settings [new file with mode: 0644]

index 398576b874d512991499bef651fa9d7e266b9d0f..06268ef6ba2c3b97e3a14ff7e5f8113d62a7575b 100644 (file)
@@ -609,7 +609,8 @@ NITSI_TESTS = \
        test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv6 \
        test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv4 \
        test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv6 \
-       test/nitsi/test/port-vlan
+       test/nitsi/test/port-vlan \
+       test/nitsi/test/port-bonding
 
 EXTRA_DIST += \
        test/nitsi/test/settings.in \
diff --git a/test/nitsi/test/port-bonding/recipe b/test/nitsi/test/port-bonding/recipe
new file mode 100644 (file)
index 0000000..4216e39
--- /dev/null
@@ -0,0 +1,35 @@
+include: setup
+
+# This contains the basic network configuration for all vpn-tests
+include: alice-port-vars
+include: bob-port-vars
+
+# Create an uplink zone
+all: network zone new upl0 bridge
+
+# Add IP addresses for Alice
+alice: network zone upl0 config new static 192.168.100.101/24
+
+# Add IP addresses for Bob
+bob: network zone upl0 config new static 192.168.100.102/24
+
+# Print what has been brought up
+all: network status
+
+all: network port new bonding +${p_net1} +${p_net2}
+
+# Check that editing works
+all: network port b0 edit +${p_net3}
+all: network port b0 edit -${p_net2}
+
+# Attach the bonding to the zone
+all: network zone upl0 port attach b0
+
+# Print what we have configured
+all: network status
+
+# Test if the bonding works by pinging bob
+alice: ping -c 5 192.168.100.102
+
+# Check if we can detach the port
+all: network zone upl0 port detach b0
diff --git a/test/nitsi/test/port-bonding/settings b/test/nitsi/test/port-bonding/settings
new file mode 100644 (file)
index 0000000..e69de29