mirror of
https://github.com/containers/skopeo.git
synced 2025-08-01 23:07:51 +00:00
systemtests: Fix 040-local-registry-auth about XDG_RUNTIME_DIR
Need to restore XDG_RUNTIME_DIR when podman removes the registry. Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
This commit is contained in:
parent
0c43e43e36
commit
454f8559c1
@ -17,6 +17,7 @@ function setup() {
|
|||||||
_cred_dir=$TESTDIR/credentials
|
_cred_dir=$TESTDIR/credentials
|
||||||
# It is important to change XDG_RUNTIME_DIR only after we start the registry, otherwise it affects the path of $XDG_RUNTIME_DIR/netns maintained by Podman,
|
# It is important to change XDG_RUNTIME_DIR only after we start the registry, otherwise it affects the path of $XDG_RUNTIME_DIR/netns maintained by Podman,
|
||||||
# making it impossible to clean up after ourselves.
|
# making it impossible to clean up after ourselves.
|
||||||
|
export XDG_RUNTIME_DIR_OLD=$XDG_RUNTIME_DIR
|
||||||
export XDG_RUNTIME_DIR=$_cred_dir
|
export XDG_RUNTIME_DIR=$_cred_dir
|
||||||
mkdir -p $_cred_dir/containers
|
mkdir -p $_cred_dir/containers
|
||||||
# Remove old/stale cred file
|
# Remove old/stale cred file
|
||||||
@ -111,6 +112,9 @@ function setup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
teardown() {
|
teardown() {
|
||||||
|
# Need to restore XDG_RUNTIME_DIR.
|
||||||
|
XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR_OLD
|
||||||
|
|
||||||
podman rm -f reg
|
podman rm -f reg
|
||||||
|
|
||||||
if [[ -n $_cred_dir ]]; then
|
if [[ -n $_cred_dir ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user