mirror of
https://github.com/systemd/systemd.git
synced 2025-01-09 01:18:19 +03:00
test: add a couple of sanity tests for --port=
This commit is contained in:
parent
cf260f799f
commit
74696ba5ef
@ -30,7 +30,8 @@ test_append_files() {
|
|||||||
seq \
|
seq \
|
||||||
sleep \
|
sleep \
|
||||||
stat \
|
stat \
|
||||||
touch
|
touch \
|
||||||
|
true
|
||||||
|
|
||||||
cp /etc/os-release "$container/usr/lib/os-release"
|
cp /etc/os-release "$container/usr/lib/os-release"
|
||||||
cat >"$container/sbin/init" <<EOF
|
cat >"$container/sbin/init" <<EOF
|
||||||
|
@ -213,6 +213,20 @@ EOF
|
|||||||
test ! -e "$tmpdir/3/nope"
|
test ! -e "$tmpdir/3/nope"
|
||||||
rm -fr "$tmpdir"
|
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
|
# Assorted tests
|
||||||
systemd-nspawn --directory="$root" --suppress-sync=yes bash -xec 'echo hello'
|
systemd-nspawn --directory="$root" --suppress-sync=yes bash -xec 'echo hello'
|
||||||
systemd-nspawn --capability=help
|
systemd-nspawn --capability=help
|
||||||
|
Loading…
Reference in New Issue
Block a user