* [PATCH 1/2] Add new test zone-new-bridge
@ 2018-08-11 13:03 Jonatan Schlag
2018-08-11 13:03 ` [PATCH 2/2] Add a test to check that we can attach ports to a zone of type bridge Jonatan Schlag
0 siblings, 1 reply; 2+ messages in thread
From: Jonatan Schlag @ 2018-08-11 13:03 UTC (permalink / raw)
To: network
[-- Attachment #1: Type: text/plain, Size: 3114 bytes --]
This test checks if we can create a new zone of type bridge.
Signed-off-by: Jonatan Schlag <jonatan.schlag(a)ipfire.org>
---
Makefile.am | 15 +++++++++------
test/nitsi/test/zone-new-bridge/.gitignore | 3 +++
test/nitsi/test/zone-new-bridge/recipe | 9 +++++++++
test/nitsi/test/zone-new-bridge/settings.in | 9 +++++++++
4 files changed, 30 insertions(+), 6 deletions(-)
create mode 100644 test/nitsi/test/zone-new-bridge/.gitignore
create mode 100644 test/nitsi/test/zone-new-bridge/recipe
create mode 100644 test/nitsi/test/zone-new-bridge/settings.in
diff --git a/Makefile.am b/Makefile.am
index 4a0c4ea..1ea715e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -601,21 +601,24 @@ CLEANFILES += \
NITSI_TESTS = \
test/nitsi/test/hello-world \
test/nitsi/test/make-check \
- test/nitsi/test/raw-device-get-by-mac
+ test/nitsi/test/raw-device-get-by-mac \
+ test/nitsi/test/zone-new-bridge
EXTRA_DIST += \
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\
- test/nitsi/test/raw-device-get-by-mac/settings.in
-
+ test/nitsi/test/make-check/settings.in \
+ test/nitsi/test/raw-device-get-by-mac/recipe \
+ test/nitsi/test/raw-device-get-by-mac/settings.in \
+ test/nitsi/test/zone-new-bridge/recipe \
+ test/nitsi/test/zone-new-bridge/settings.in
CLEANFILES += \
test/nitsi/test/make-check/recipe \
test/nitsi/test/make-check/settings \
- test/nitsi/test/raw-device-get-by-mac/settings
+ test/nitsi/test/raw-device-get-by-mac/settings \
+ test/nitsi/test/zone-new-bridge/settings
NITSI_ENVIRONMENT =
diff --git a/test/nitsi/test/zone-new-bridge/.gitignore b/test/nitsi/test/zone-new-bridge/.gitignore
new file mode 100644
index 0000000..8a9bd77
--- /dev/null
+++ b/test/nitsi/test/zone-new-bridge/.gitignore
@@ -0,0 +1,3 @@
+/log
+/recipe.log
+/settings
diff --git a/test/nitsi/test/zone-new-bridge/recipe b/test/nitsi/test/zone-new-bridge/recipe
new file mode 100644
index 0000000..d6dcfb7
--- /dev/null
+++ b/test/nitsi/test/zone-new-bridge/recipe
@@ -0,0 +1,9 @@
+include: ../../include/make-install
+include: ../../include/network-settings
+include: ../../include/network-reset
+alice: network zone new upl0 bridge
+# this returns zero if the device exists
+alice: ip link show upl0
+alice: ls /sys/class/net/upl0
+# check that the config dir exists
+alice: ls /etc/network/zones/upl0
diff --git a/test/nitsi/test/zone-new-bridge/settings.in b/test/nitsi/test/zone-new-bridge/settings.in
new file mode 100644
index 0000000..207cfa0
--- /dev/null
+++ b/test/nitsi/test/zone-new-bridge/settings.in
@@ -0,0 +1,9 @@
+[GENERAL]
+name = zone-new-bridge
+description = This test checks if we can create a new zone of the type 'bridge'
+
+copy_from = ../../../../@PACKAGE_NAME(a)-@PACKAGE_VERSION(a).tar.gz
+copy_to = /root/
+
+[VIRTUAL_ENVIRONMENT]
+path = ../../virtual-environment/basic
--
2.11.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/2] Add a test to check that we can attach ports to a zone of type bridge
2018-08-11 13:03 [PATCH 1/2] Add new test zone-new-bridge Jonatan Schlag
@ 2018-08-11 13:03 ` Jonatan Schlag
0 siblings, 0 replies; 2+ messages in thread
From: Jonatan Schlag @ 2018-08-11 13:03 UTC (permalink / raw)
To: network
[-- Attachment #1: Type: text/plain, Size: 3215 bytes --]
Signed-off-by: Jonatan Schlag <jonatan.schlag(a)ipfire.org>
---
Makefile.am | 10 +++++++---
test/nitsi/test/zone-port-attach-bridge/.gitignore | 3 +++
test/nitsi/test/zone-port-attach-bridge/recipe | 9 +++++++++
test/nitsi/test/zone-port-attach-bridge/settings.in | 9 +++++++++
4 files changed, 28 insertions(+), 3 deletions(-)
create mode 100644 test/nitsi/test/zone-port-attach-bridge/.gitignore
create mode 100644 test/nitsi/test/zone-port-attach-bridge/recipe
create mode 100644 test/nitsi/test/zone-port-attach-bridge/settings.in
diff --git a/Makefile.am b/Makefile.am
index 1ea715e..fa12f4e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -602,7 +602,8 @@ NITSI_TESTS = \
test/nitsi/test/hello-world \
test/nitsi/test/make-check \
test/nitsi/test/raw-device-get-by-mac \
- test/nitsi/test/zone-new-bridge
+ test/nitsi/test/zone-new-bridge \
+ test/nitsi/test/zone-port-attach-bridge
EXTRA_DIST += \
test/nitsi/test/hello-world/recipe \
@@ -612,13 +613,16 @@ EXTRA_DIST += \
test/nitsi/test/raw-device-get-by-mac/recipe \
test/nitsi/test/raw-device-get-by-mac/settings.in \
test/nitsi/test/zone-new-bridge/recipe \
- test/nitsi/test/zone-new-bridge/settings.in
+ 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
CLEANFILES += \
test/nitsi/test/make-check/recipe \
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-new-bridge/settings \
+ test/nitsi/test/zone-port-attach-bridge/settings
NITSI_ENVIRONMENT =
diff --git a/test/nitsi/test/zone-port-attach-bridge/.gitignore b/test/nitsi/test/zone-port-attach-bridge/.gitignore
new file mode 100644
index 0000000..8a9bd77
--- /dev/null
+++ b/test/nitsi/test/zone-port-attach-bridge/.gitignore
@@ -0,0 +1,3 @@
+/log
+/recipe.log
+/settings
diff --git a/test/nitsi/test/zone-port-attach-bridge/recipe b/test/nitsi/test/zone-port-attach-bridge/recipe
new file mode 100644
index 0000000..92dd262
--- /dev/null
+++ b/test/nitsi/test/zone-port-attach-bridge/recipe
@@ -0,0 +1,9 @@
+include: ../../include/make-install
+include: ../../include/network-settings
+include: ../../include/network-reset
+alice: network zone new upl0 bridge
+# Create a dummy port we can attach to upl0
+alice: network port new dummy
+alice: network zone upl0 port attach d0
+# Check if the port is really attached
+alice: ls /sys/class/net/upl0/brif/d0
\ No newline at end of file
diff --git a/test/nitsi/test/zone-port-attach-bridge/settings.in b/test/nitsi/test/zone-port-attach-bridge/settings.in
new file mode 100644
index 0000000..c52be6d
--- /dev/null
+++ b/test/nitsi/test/zone-port-attach-bridge/settings.in
@@ -0,0 +1,9 @@
+[GENERAL]
+name = zone-port-attach-bridge
+description = This test checks if we cann attach a dummy port to a zone
+
+copy_from = ../../../../@PACKAGE_NAME(a)-@PACKAGE_VERSION(a).tar.gz
+copy_to = /root/
+
+[VIRTUAL_ENVIRONMENT]
+path = ../../virtual-environment/basic
--
2.11.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-11 13:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-11 13:03 [PATCH 1/2] Add new test zone-new-bridge Jonatan Schlag
2018-08-11 13:03 ` [PATCH 2/2] Add a test to check that we can attach ports to a zone of type bridge Jonatan Schlag
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox