mirror of
https://github.com/containers/skopeo.git
synced 2025-07-05 19:06:54 +00:00
Don't affect $XDG_RUNTIME_DIR of Podman starting the registry
Otherwise $XDG_RUNTIME_DIR/netns gets created and mounted, breaking (rm -rf). Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
parent
641efe9930
commit
36c480f643
@ -8,17 +8,19 @@ load helpers
|
|||||||
function setup() {
|
function setup() {
|
||||||
standard_setup
|
standard_setup
|
||||||
|
|
||||||
# Remove old/stale cred file
|
|
||||||
_cred_dir=$TESTDIR/credentials
|
|
||||||
export XDG_RUNTIME_DIR=$_cred_dir
|
|
||||||
mkdir -p $_cred_dir/containers
|
|
||||||
rm -f $_cred_dir/containers/auth.json
|
|
||||||
|
|
||||||
# Start authenticated registry with random password
|
# Start authenticated registry with random password
|
||||||
testuser=testuser
|
testuser=testuser
|
||||||
testpassword=$(random_string 15)
|
testpassword=$(random_string 15)
|
||||||
|
|
||||||
start_registry --testuser=$testuser --testpassword=$testpassword --enable-delete=true reg
|
start_registry --testuser=$testuser --testpassword=$testpassword --enable-delete=true reg
|
||||||
|
|
||||||
|
_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,
|
||||||
|
# making it imposible to clean up after ourselves.
|
||||||
|
export XDG_RUNTIME_DIR=$_cred_dir
|
||||||
|
mkdir -p $_cred_dir/containers
|
||||||
|
# Remove old/stale cred file
|
||||||
|
rm -f $_cred_dir/containers/auth.json
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "auth: credentials on command line" {
|
@test "auth: credentials on command line" {
|
||||||
|
Loading…
Reference in New Issue
Block a user