mirror of
https://github.com/containers/podman.git
synced 2025-11-28 17:18:58 +08:00
hack/bats: port it to use the new remote support
The system tests can setup their own server now so just use that and don't require the user to spawn its own. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
20
hack/bats
20
hack/bats
@@ -12,7 +12,7 @@ $0 is a wrapper for invoking podman system tests.
|
|||||||
|
|
||||||
--root Run only as root
|
--root Run only as root
|
||||||
--rootless Run only as user (i.e. you)
|
--rootless Run only as user (i.e. you)
|
||||||
--remote Run with podman-remote (see below)
|
--remote Run with podman-remote
|
||||||
|
|
||||||
FILENAME-PATTERN Run only test files that match 'test/system/*name*',
|
FILENAME-PATTERN Run only test files that match 'test/system/*name*',
|
||||||
e.g. '500' or 'net' will match 500-networking.bats.
|
e.g. '500' or 'net' will match 500-networking.bats.
|
||||||
@@ -36,16 +36,6 @@ By default, tests ./bin/podman. To test a different podman, do:
|
|||||||
|
|
||||||
\$ env PODMAN=/abs/path/to/podman $0 ....
|
\$ env PODMAN=/abs/path/to/podman $0 ....
|
||||||
|
|
||||||
To test podman-remote, start your own servers (root and rootless) via:
|
|
||||||
|
|
||||||
\$ bin/podman system service --timeout=0 &
|
|
||||||
\$ sudo !!
|
|
||||||
|
|
||||||
...then invoke this script with --remote. (This script can't start the
|
|
||||||
servers, because we can sudo *starting* the service but can't sudo
|
|
||||||
stopping it: by the time the bats tests finish, the sudo timeout will
|
|
||||||
have expired. We apologize for the inconvenience.)
|
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
\$ $0 220:\"restart cleans up\"
|
\$ $0 220:\"restart cleans up\"
|
||||||
@@ -113,13 +103,7 @@ if [[ "$REMOTE" ]]; then
|
|||||||
if ! [[ $PODMAN =~ -remote ]]; then
|
if ! [[ $PODMAN =~ -remote ]]; then
|
||||||
PODMAN=${PODMAN}-remote
|
PODMAN=${PODMAN}-remote
|
||||||
fi
|
fi
|
||||||
|
export REMOTESYSTEM_TRANSPORT=unix
|
||||||
if [[ -n "$TEST_ROOT" ]]; then
|
|
||||||
sudo $PODMAN info >/dev/null || exit 1
|
|
||||||
fi
|
|
||||||
if [[ -n "$TEST_ROOTLESS" ]]; then
|
|
||||||
$PODMAN info >/dev/null || exit 1
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# END initialization and command-line arg checking
|
# END initialization and command-line arg checking
|
||||||
|
|||||||
Reference in New Issue
Block a user