diff options
author | Ed Santiago <santiago@redhat.com> | 2020-06-18 15:12:07 -0600 |
---|---|---|
committer | Ed Santiago <santiago@redhat.com> | 2020-06-22 15:57:18 -0600 |
commit | d4504e6f53895e9f0125b560d0e01e697e96ac2e (patch) | |
tree | 443e81411d9cdce3bc5248f5fad5c69bf178284d /test/system/helpers.bash | |
parent | 22942e392df57d0ae5cc8ebdd27d060e43206d62 (diff) | |
download | podman-d4504e6f53895e9f0125b560d0e01e697e96ac2e.tar.gz podman-d4504e6f53895e9f0125b560d0e01e697e96ac2e.tar.bz2 podman-d4504e6f53895e9f0125b560d0e01e697e96ac2e.zip |
system tests: new rm, build tests
- rm: confirm 'rm' and 'rm -f' on running container
- build: shotgun test of workdir, cmd, env, labels
The new build test cd's to a temporary directory, which broke
test invocations using a relative path (./bin/podman). Added
code to detect relative paths and convert them to absolute.
Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/system/helpers.bash')
-rw-r--r-- | test/system/helpers.bash | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/system/helpers.bash b/test/system/helpers.bash index 7ec2105d1..7e6f1c1ca 100644 --- a/test/system/helpers.bash +++ b/test/system/helpers.bash @@ -2,6 +2,12 @@ # Podman command to run; may be podman-remote PODMAN=${PODMAN:-podman} +# If it's a relative path, convert to absolute; otherwise tests can't cd out +if [[ "$PODMAN" =~ / ]]; then + if [[ ! "$PODMAN" =~ ^/ ]]; then + PODMAN=$(realpath $PODMAN) + fi +fi # Standard image to use for most tests PODMAN_TEST_IMAGE_REGISTRY=${PODMAN_TEST_IMAGE_REGISTRY:-"quay.io"} |