summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-04-26 17:30:16 -0400
committerGitHub <noreply@github.com>2021-04-26 17:30:16 -0400
commit2039be00d12afaab84659619c47a463cacb039f5 (patch)
treecc2926941ccd19c4412c8ea26eed2365ecbce348
parent258a490fe48f9f3356c38e5d616fdc3512e49f13 (diff)
parent3886524d536e5c255831bc25cab186ca4c0228ab (diff)
downloadpodman-2039be00d12afaab84659619c47a463cacb039f5.tar.gz
podman-2039be00d12afaab84659619c47a463cacb039f5.tar.bz2
podman-2039be00d12afaab84659619c47a463cacb039f5.zip
Merge pull request #10140 from vrothberg/image-unit
libpod/image: unit tests: don't use system's registries.conf.d
-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