Merge pull request #10140 from vrothberg/image-unit

libpod/image: unit tests: don't use system's registries.conf.d
This commit is contained in:
OpenShift Merge Robot 2021-04-26 17:30:16 -04:00 committed by GitHub
commit 2039be00d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -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