summaryrefslogtreecommitdiff
path: root/test/system
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-05-19 08:22:13 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2021-05-19 15:35:59 -0400
commit55f00bac02fcde7fbe960a9a80131dbc72630b5b (patch)
treeb1d1c8b9357acd4d065de3cd5f8d98f3266c0150 /test/system
parent4c756268e6d0dbe90e61a59d9644e34a0f2d5f36 (diff)
downloadpodman-55f00bac02fcde7fbe960a9a80131dbc72630b5b.tar.gz
podman-55f00bac02fcde7fbe960a9a80131dbc72630b5b.tar.bz2
podman-55f00bac02fcde7fbe960a9a80131dbc72630b5b.zip
Clear the storage-options from the graphdriver if users specifies --root
Fixes: https://github.com/containers/podman/issues/10393 Currently if a user specifies a --root flag to override the location of the container storage, we still enforce the storage-opts from storage.conf. This causes issues with people trying to intereact with the additional stores feature, and then forces them to use the obscure --storage-opt="" option. I belive this should be the default and we already do this when the user specifies the --storage-driver option. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test/system')
-rw-r--r--test/system/005-info.bats8
-rw-r--r--test/system/010-images.bats2
-rw-r--r--test/system/150-login.bats6
-rw-r--r--test/system/330-corrupt-images.bats2
4 files changed, 13 insertions, 5 deletions
diff --git a/test/system/005-info.bats b/test/system/005-info.bats
index 83d79221a..4b419841e 100644
--- a/test/system/005-info.bats
+++ b/test/system/005-info.bats
@@ -82,4 +82,12 @@ store.imageStore.number | 1
# mounts.
is "$output" ".*graphOptions: {}" "output includes graphOptions: {}"
}
+
+@test "podman --root PATH info - basic output" {
+ if ! is_remote; then
+ run_podman --storage-driver=vfs --root ${PODMAN_TMPDIR}/nothing-here-move-along info --format '{{ .Store.GraphOptions }}'
+ is "$output" "map\[\]" "'podman --root should reset Graphoptions to []"
+ fi
+}
+
# vim: filetype=sh
diff --git a/test/system/010-images.bats b/test/system/010-images.bats
index bda331e6b..2d7ac1e0c 100644
--- a/test/system/010-images.bats
+++ b/test/system/010-images.bats
@@ -12,7 +12,7 @@ load helpers
# 'podman images' should emit headings even if there are no images
# (but --root only works locally)
if ! is_remote; then
- run_podman --root ${PODMAN_TMPDIR}/nothing-here-move-along images
+ run_podman --storage-driver=vfs --root ${PODMAN_TMPDIR}/nothing-here-move-along images
is "$output" "$headings" "'podman images' emits headings even w/o images"
fi
}
diff --git a/test/system/150-login.bats b/test/system/150-login.bats
index c3af63348..b6c04db08 100644
--- a/test/system/150-login.bats
+++ b/test/system/150-login.bats
@@ -62,7 +62,7 @@ function setup() {
# Pull registry image, but into a separate container storage
mkdir -p ${PODMAN_LOGIN_WORKDIR}/root
mkdir -p ${PODMAN_LOGIN_WORKDIR}/runroot
- PODMAN_LOGIN_ARGS="--root ${PODMAN_LOGIN_WORKDIR}/root --runroot ${PODMAN_LOGIN_WORKDIR}/runroot"
+ PODMAN_LOGIN_ARGS="--storage-driver=vfs --root ${PODMAN_LOGIN_WORKDIR}/root --runroot ${PODMAN_LOGIN_WORKDIR}/runroot"
# Give it three tries, to compensate for flakes
run_podman ${PODMAN_LOGIN_ARGS} pull $REGISTRY_IMAGE ||
run_podman ${PODMAN_LOGIN_ARGS} pull $REGISTRY_IMAGE ||
@@ -306,10 +306,10 @@ function _test_skopeo_credential_sharing() {
skip "[leaving registry running by request]"
fi
- run_podman --root ${PODMAN_LOGIN_WORKDIR}/root \
+ run_podman --storage-driver=vfs --root ${PODMAN_LOGIN_WORKDIR}/root \
--runroot ${PODMAN_LOGIN_WORKDIR}/runroot \
rm -f registry
- run_podman --root ${PODMAN_LOGIN_WORKDIR}/root \
+ run_podman --storage-driver=vfs --root ${PODMAN_LOGIN_WORKDIR}/root \
--runroot ${PODMAN_LOGIN_WORKDIR}/runroot \
rmi -a
diff --git a/test/system/330-corrupt-images.bats b/test/system/330-corrupt-images.bats
index c51cc8d46..2ee5eee9c 100644
--- a/test/system/330-corrupt-images.bats
+++ b/test/system/330-corrupt-images.bats
@@ -19,7 +19,7 @@ PODMAN_CORRUPT_TEST_IMAGE_ID=961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364b
# All tests in this file (and ONLY in this file) run with a custom rootdir
function setup() {
skip_if_remote "none of these tests run under podman-remote"
- _PODMAN_TEST_OPTS="--root ${PODMAN_CORRUPT_TEST_WORKDIR}/root"
+ _PODMAN_TEST_OPTS="--storage-driver=vfs --root ${PODMAN_CORRUPT_TEST_WORKDIR}/root"
}
function teardown() {