Signed-off-by: Jonatan Schlag jonatan.schlag@ipfire.org --- test/nitsi/include/network-reset | 1 + 1 file changed, 1 insertion(+) create mode 100644 test/nitsi/include/network-reset
diff --git a/test/nitsi/include/network-reset b/test/nitsi/include/network-reset new file mode 100644 index 0000000..d82e2b1 --- /dev/null +++ b/test/nitsi/include/network-reset @@ -0,0 +1 @@ +all: network reset --force
Some network settings are equal for each test (we always want debugging messages). We use this recipe to write them down once and using them via the include statement in every test.
Signed-off-by: Jonatan Schlag jonatan.schlag@ipfire.org --- test/nitsi/include/network-settings | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 test/nitsi/include/network-settings
diff --git a/test/nitsi/include/network-settings b/test/nitsi/include/network-settings new file mode 100644 index 0000000..8a0facb --- /dev/null +++ b/test/nitsi/include/network-settings @@ -0,0 +1,2 @@ +# Generic network settings whcih are equal for each test +all: network settings DEBUG=1 \ No newline at end of file
This test if we can execute 'network zone new upl0 bridge'
Signed-off-by: Jonatan Schlag jonatan.schlag@ipfire.org --- Makefile.am | 10 +++++++--- test/nitsi/test/zone-new-bridge/recipe | 9 +++++++++ test/nitsi/test/zone-new-bridge/settings.in | 9 +++++++++ 3 files changed, 25 insertions(+), 3 deletions(-) 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 e56d0fb..e717133 100644 --- a/Makefile.am +++ b/Makefile.am @@ -596,17 +596,21 @@ CLEANFILES += \
NITSI_TESTS = \ test/nitsi/test/hello-world \ - test/nitsi/test/make-check + test/nitsi/test/make-check \ + 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/make-check/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/make-check/settings \ + test/nitsi/test/zone-new-bridge/settings
NITSI_ENVIRONMENT =
diff --git a/test/nitsi/test/zone-new-bridge/recipe b/test/nitsi/test/zone-new-bridge/recipe new file mode 100644 index 0000000..6c054df --- /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 +all: network zone new upl0 bridge +# this returns zero if the device exists +all: ip link show upl0 +all: ls /sys/class/net/upl0 +# check that the config dir exists +all: 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@-@PACKAGE_VERSION@.tar.gz +copy_to = /root/ + +[VIRTUAL_ENVIRONMENT] +path = ../../virtual-environment/basic
Hello,
is it required to run this test on multiple machines simultaneously?
One should do, shouldn't it?
-Michael
On Sat, 2018-06-30 at 20:01 +0200, Jonatan Schlag wrote:
This test if we can execute 'network zone new upl0 bridge'
Signed-off-by: Jonatan Schlag jonatan.schlag@ipfire.org
Makefile.am | 10 +++++++--- test/nitsi/test/zone-new-bridge/recipe | 9 +++++++++ test/nitsi/test/zone-new-bridge/settings.in | 9 +++++++++ 3 files changed, 25 insertions(+), 3 deletions(-) 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 e56d0fb..e717133 100644 --- a/Makefile.am +++ b/Makefile.am @@ -596,17 +596,21 @@ CLEANFILES += \
NITSI_TESTS = \ test/nitsi/test/hello-world \
- test/nitsi/test/make-check
- test/nitsi/test/make-check \
- 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/make-check/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/make-check/settings \
- test/nitsi/test/zone-new-bridge/settings
NITSI_ENVIRONMENT =
diff --git a/test/nitsi/test/zone-new-bridge/recipe b/test/nitsi/test/zone- new-bridge/recipe new file mode 100644 index 0000000..6c054df --- /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 +all: network zone new upl0 bridge +# this returns zero if the device exists +all: ip link show upl0 +all: ls /sys/class/net/upl0 +# check that the config dir exists +all: 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@-@PACKAGE_VERSION@.tar.gz +copy_to = /root/
+[VIRTUAL_ENVIRONMENT] +path = ../../virtual-environment/basic
Why --force?
How is this test going to validate that the network has been reset properly?
-Michael
On Sat, 2018-06-30 at 20:01 +0200, Jonatan Schlag wrote:
Signed-off-by: Jonatan Schlag jonatan.schlag@ipfire.org
test/nitsi/include/network-reset | 1 + 1 file changed, 1 insertion(+) create mode 100644 test/nitsi/include/network-reset
diff --git a/test/nitsi/include/network-reset b/test/nitsi/include/network- reset new file mode 100644 index 0000000..d82e2b1 --- /dev/null +++ b/test/nitsi/include/network-reset @@ -0,0 +1 @@ +all: network reset --force