summaryrefslogtreecommitdiffstats
path: root/test/units
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2023-05-17 14:57:50 +0200
committerFrantisek Sumsal <frantisek@sumsal.cz>2023-05-18 16:50:24 +0200
commit74696ba5ef0d76d6541482ae3b48f249a3270ad2 (patch)
tree5ca4694c503d3df1f193718b80b9ab424f74fcbc /test/units
parenttest: drop "check" from test case names (diff)
downloadsystemd-74696ba5ef0d76d6541482ae3b48f249a3270ad2.tar.xz
systemd-74696ba5ef0d76d6541482ae3b48f249a3270ad2.zip
test: add a couple of sanity tests for --port=
Diffstat (limited to 'test/units')
-rwxr-xr-xtest/units/testsuite-13.nspawn.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/units/testsuite-13.nspawn.sh b/test/units/testsuite-13.nspawn.sh
index bcade545e8..37629a706a 100755
--- a/test/units/testsuite-13.nspawn.sh
+++ b/test/units/testsuite-13.nspawn.sh
@@ -213,6 +213,20 @@ EOF
test ! -e "$tmpdir/3/nope"
rm -fr "$tmpdir"
+ # --port (sanity only)
+ systemd-nspawn --network-veth --directory="$root" --port=80 --port=90 true
+ systemd-nspawn --network-veth --directory="$root" --port=80:8080 true
+ systemd-nspawn --network-veth --directory="$root" --port=tcp:80 true
+ systemd-nspawn --network-veth --directory="$root" --port=tcp:80:8080 true
+ systemd-nspawn --network-veth --directory="$root" --port=udp:80 true
+ systemd-nspawn --network-veth --directory="$root" --port=udp:80:8080 --port=tcp:80:8080 true
+ (! systemd-nspawn --network-veth --directory="$root" --port= true)
+ (! systemd-nspawn --network-veth --directory="$root" --port=-1 true)
+ (! systemd-nspawn --network-veth --directory="$root" --port=: true)
+ (! systemd-nspawn --network-veth --directory="$root" --port=icmp:80:8080 true)
+ (! systemd-nspawn --network-veth --directory="$root" --port=tcp::8080 true)
+ (! systemd-nspawn --network-veth --directory="$root" --port=8080: true)
+
# Assorted tests
systemd-nspawn --directory="$root" --suppress-sync=yes bash -xec 'echo hello'
systemd-nspawn --capability=help