summaryrefslogtreecommitdiff
path: root/libpod/image/pull_test.go
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2021-04-26 17:22:01 +0200
committerValentin Rothberg <rothberg@redhat.com>2021-04-26 17:46:36 +0200
commit3886524d536e5c255831bc25cab186ca4c0228ab (patch)
treeee995a4644cc5d5d98240e5829a585dfd3327e5a /libpod/image/pull_test.go
parent476c76f580d5cd092ff958765af36857b2a68d6c (diff)
downloadpodman-3886524d536e5c255831bc25cab186ca4c0228ab.tar.gz
podman-3886524d536e5c255831bc25cab186ca4c0228ab.tar.bz2
podman-3886524d536e5c255831bc25cab186ca4c0228ab.zip
libpod/image: unit tests: don't use system's registries.conf.d
This should make the unit tests pass on updated CI images. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'libpod/image/pull_test.go')
-rw-r--r--libpod/image/pull_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/libpod/image/pull_test.go b/libpod/image/pull_test.go
index 2e1464ad3..d2930451c 100644
--- a/libpod/image/pull_test.go
+++ b/libpod/image/pull_test.go
@@ -308,6 +308,12 @@ func TestPullGoalFromPossiblyUnqualifiedName(t *testing.T) {
sc.UserShortNameAliasConfPath = aliasesConf.Name()
sc.SystemRegistriesConfPath = registriesConf.Name()
+ // Make sure to not sure the system's registries.conf.d
+ dir, err := ioutil.TempDir("", "example")
+ require.NoError(t, err)
+ sc.SystemRegistriesConfDirPath = dir
+ defer os.RemoveAll(dir) // clean up
+
for _, c := range []struct {
input string
expected []pullRefStrings