mirror of
https://github.com/containers/podman.git
synced 2025-06-23 02:18:13 +08:00
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>
This commit is contained in:
@ -308,6 +308,12 @@ func TestPullGoalFromPossiblyUnqualifiedName(t *testing.T) {
|
|||||||
sc.UserShortNameAliasConfPath = aliasesConf.Name()
|
sc.UserShortNameAliasConfPath = aliasesConf.Name()
|
||||||
sc.SystemRegistriesConfPath = registriesConf.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 {
|
for _, c := range []struct {
|
||||||
input string
|
input string
|
||||||
expected []pullRefStrings
|
expected []pullRefStrings
|
||||||
|
Reference in New Issue
Block a user