]> git.ipfire.org Git - network.git/commitdiff
nitsi: Add phase1
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 15 Sep 2018 21:57:09 +0000 (22:57 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 15 Sep 2018 21:58:18 +0000 (22:58 +0100)
This is supposed to be a good base to build on for any test that
needs a working layer 2 and some IP addresses on the network
to reach any other machines

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
test/nitsi/include/phase1 [new file with mode: 0644]
test/nitsi/test/phase1/recipe [new file with mode: 0644]
test/nitsi/test/phase1/settings [new file with mode: 0644]

index 1f2dac64d9c7d6b94a7520671a2123d46af21889..3688508353a7206a9f9708372b7a1e9aec7b637c 100644 (file)
@@ -599,6 +599,7 @@ CLEANFILES += \
 NITSI_TESTS = \
        test/nitsi/test/hello-world \
        test/nitsi/test/make-check \
 NITSI_TESTS = \
        test/nitsi/test/hello-world \
        test/nitsi/test/make-check \
+       test/nitsi/test/phase1 \
        test/nitsi/test/raw-device-get-by-mac \
        test/nitsi/test/zone-new-bridge \
        test/nitsi/test/zone-port-attach-bridge
        test/nitsi/test/raw-device-get-by-mac \
        test/nitsi/test/zone-new-bridge \
        test/nitsi/test/zone-port-attach-bridge
diff --git a/test/nitsi/include/phase1 b/test/nitsi/include/phase1
new file mode 100644 (file)
index 0000000..8679131
--- /dev/null
@@ -0,0 +1,32 @@
+# The file contains some basic setup that creates two zones
+# and a couple of ports
+
+# This contains the basic network configuration for all vpn-tests
+include: ../include/alice-port-vars
+include: ../include/bob-port-vars
+
+# Create an uplink zone
+all: network zone new upl0 bridge
+all: network zone upl0 port attach ${p_net1}
+
+# Create a local zone
+all: network zone new net0 bridge
+
+# Attach a dummy port to net0
+all: network port new dummy
+all: network zone net0 port attach d0
+
+# Add IP addresses for Alice
+alice: network zone upl0 config new static 192.168.100.101/24
+alice: network zone upl0 config new static 2001:db8:100::101/64
+alice: network zone net0 config new static 192.168.200.1/24
+alice: network zone net0 config new static 2001:db8:200::1/64
+
+# Add IP addresses for Bob
+bob: network zone upl0 config new static 192.168.100.102/24
+bob: network zone upl0 config new static 2001:db8:100::102/64
+bob: network zone net0 config new static 192.168.201.1/24
+bob: network zone net0 config new static 2001:db8:201::1/64
+
+# Print what has been brought up
+all: network status
diff --git a/test/nitsi/test/phase1/recipe b/test/nitsi/test/phase1/recipe
new file mode 100644 (file)
index 0000000..61e27f3
--- /dev/null
@@ -0,0 +1,6 @@
+include: ../../include/setup
+include: ../../include/phase1
+
+# Let Alice ping Bob
+alice: ping -c 5 192.168.100.102
+alice: ping6 -c 5 2001:db8:100::102
diff --git a/test/nitsi/test/phase1/settings b/test/nitsi/test/phase1/settings
new file mode 100644 (file)
index 0000000..4757c7a
--- /dev/null
@@ -0,0 +1,3 @@
+[GENERAL]
+name = Validate Phase 1
+description = This test checks if phase 1 can be brought up