From a49c8bedeb2acff106f2be6502ef30b8b3e01693 Mon Sep 17 00:00:00 2001 From: Jonatan Schlag Date: Tue, 18 Sep 2018 21:48:08 +0200 Subject: [PATCH] Nitsi: Add test for port bonding Signed-off-by: Jonatan Schlag --- Makefile.am | 3 ++- test/nitsi/test/port-bonding/recipe | 35 +++++++++++++++++++++++++++ test/nitsi/test/port-bonding/settings | 0 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 test/nitsi/test/port-bonding/recipe create mode 100644 test/nitsi/test/port-bonding/settings diff --git a/Makefile.am b/Makefile.am index 398576b..06268ef 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 index 0000000..4216e39 --- /dev/null +++ b/test/nitsi/test/port-bonding/recipe @@ -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 index 0000000..e69de29 -- 2.39.2