]> git.ipfire.org Git - people/jschlag/network.git/commitdiff
Merge remote-tracking branch 'upstream/master'
authorJonatan Schlag <jonatan.schlag@ipfire.org>
Sat, 15 Sep 2018 22:14:36 +0000 (00:14 +0200)
committerJonatan Schlag <jonatan.schlag@ipfire.org>
Sat, 15 Sep 2018 22:14:36 +0000 (00:14 +0200)
Makefile.am
test/nitsi/include/phase1 [new file with mode: 0644]
test/nitsi/test/hello-world/recipe [deleted file]
test/nitsi/test/hello-world/settings [deleted file]
test/nitsi/test/phase1/recipe [new file with mode: 0644]
test/nitsi/test/phase1/settings [new file with mode: 0644]

index 786442c813673ffc5c3cbfdb428ebb82a54c78fa..3df14fb2cfef90ab9f824ee4be8f553fb31b0511 100644 (file)
@@ -191,13 +191,15 @@ dist_network_DATA = \
        src/functions/functions.wpa_supplicant \
        src/functions/functions.zone \
        src/network-radvd-config \
-       src/dhclient-helper \
        src/header-config \
        src/header-port \
        src/header-zone \
        src/ppp/dialer \
        src/ppp/pppoe-server
 
+dist_network_SCRIPTS = \
+       src/dhclient-helper
+
 dist_helpers_SCRIPTS = \
        src/helpers/dhcpd-config-helper \
        src/helpers/firewall-kernel-init \
@@ -595,16 +597,14 @@ CLEANFILES += \
        test/nitsi/include/setup
 
 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
 
 EXTRA_DIST += \
        test/nitsi/test/settings.in \
-       test/nitsi/test/hello-world/recipe \
-       test/nitsi/test/hello-world/settings \
        test/nitsi/test/make-check/recipe.in \
        test/nitsi/test/make-check/settings.in \
        test/nitsi/test/raw-device-get-by-mac/recipe \
@@ -612,10 +612,7 @@ EXTRA_DIST += \
        test/nitsi/test/zone-new-bridge/recipe \
        test/nitsi/test/zone-new-bridge/settings.in \
        test/nitsi/test/zone-port-attach-bridge/recipe \
-       test/nitsi/test/zone-port-attach-bridge/settings.in \
-       test/nitsi/test/zone-up_down/recipe \
-       test/nitsi/test/zone-up_down/settings.in \
-       test/nitsi/test/vpn-ipsec-ipv64-ipv4-vti/recipe
+       test/nitsi/test/zone-port-attach-bridge/settings.in
 
 CLEANFILES += \
        test/nitsi/test/settings \
@@ -623,8 +620,7 @@ CLEANFILES += \
        test/nitsi/test/make-check/settings \
        test/nitsi/test/raw-device-get-by-mac/settings \
        test/nitsi/test/zone-new-bridge/settings \
-       test/nitsi/test/zone-port-attach-bridge/settings \
-       test/nitsi/test/zone-up_down/settings
+       test/nitsi/test/zone-port-attach-bridge/settings
 
 NITSI_ENVIRONMENT =
 
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/hello-world/recipe b/test/nitsi/test/hello-world/recipe
deleted file mode 100644 (file)
index fc83ede..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-alice: echo "Hello World"
-bob: echo "Hello World"
diff --git a/test/nitsi/test/hello-world/settings b/test/nitsi/test/hello-world/settings
deleted file mode 100644 (file)
index 35aeb02..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-[GENERAL]
-name = Hello World
-description = This is a test to just check if nitsi is working.
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