projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ensure we delete removed BroadcastSubnets when reloading configuration.
[tinc]
/
test
/
variables.test
diff --git
a/test/variables.test
b/test/variables.test
index
0164e27
..
e63138f
100755
(executable)
--- a/
test/variables.test
+++ b/
test/variables.test
@@
-1,6
+1,5
@@
#!/bin/sh
#!/bin/sh
-# shellcheck source=testlib.sh
. ./testlib.sh
echo [STEP] Initialize one node
. ./testlib.sh
echo [STEP] Initialize one node
@@
-23,7
+22,7
@@
test "$(tinc foo get Mode)" = "Switch"
echo [STEP] Test deletion
echo [STEP] Test deletion
-
must_fail
tinc foo del Mode hub
+
expect_code "$EXIT_FAILURE"
tinc foo del Mode hub
tinc foo del Mode switch
test -z "$(tinc foo get Mode)"
tinc foo del Mode switch
test -z "$(tinc foo get Mode)"
@@
-53,7
+52,7
@@
test -z "$(tinc foo get Subnet)"
echo [STEP] We should not be able to get/set server variables using node.variable syntax
test -z "$(tinc foo get foo.Name)"
echo [STEP] We should not be able to get/set server variables using node.variable syntax
test -z "$(tinc foo get foo.Name)"
-
must_fail
tinc foo set foo.Name bar
+
expect_code "$EXIT_FAILURE"
tinc foo set foo.Name bar
echo [STEP] Test getting/setting host variables for other nodes
echo [STEP] Test getting/setting host variables for other nodes
@@
-81,11
+80,11
@@
test -z "$(tinc foo get bar.Subnet)"
echo [STEP] We should not be able to get/set for nodes with invalid names
touch "$DIR_FOO/hosts/qu-ux"
echo [STEP] We should not be able to get/set for nodes with invalid names
touch "$DIR_FOO/hosts/qu-ux"
-
must_fail
tinc foo set qu-ux.Subnet 1
+
expect_code "$EXIT_FAILURE"
tinc foo set qu-ux.Subnet 1
echo [STEP] We should not be able to set obsolete variables unless forced
echo [STEP] We should not be able to set obsolete variables unless forced
-
must_fail
tinc foo set PrivateKey 12345
+
expect_code "$EXIT_FAILURE"
tinc foo set PrivateKey 12345
tinc foo --force set PrivateKey 12345
test "$(tinc foo get PrivateKey)" = "12345"
tinc foo --force set PrivateKey 12345
test "$(tinc foo get PrivateKey)" = "12345"