diff options
author | baude <bbaude@redhat.com> | 2018-04-16 13:39:00 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-04-18 14:07:59 +0000 |
commit | 313e5e83e92f68349d2026fc3f358f237fe93a4a (patch) | |
tree | 91c523b44bb8f55790037a9a7b42bf63e3c90de6 /libpod/runtime_img_test.go | |
parent | 982927468c6102cfc52e838be4815d2f89d3827e (diff) | |
download | podman-313e5e83e92f68349d2026fc3f358f237fe93a4a.tar.gz podman-313e5e83e92f68349d2026fc3f358f237fe93a4a.tar.bz2 podman-313e5e83e92f68349d2026fc3f358f237fe93a4a.zip |
regression: tls verify should be set on registries.conf if insecure
In the case where podman needs to pull an image, if that registry that the image
resides on is known to be insesure (as defined in /etc/containers/registries.conf),
tls-verify should be altered on the fly.
Signed-off-by: baude <bbaude@redhat.com>
Closes: #626
Approved by: mheon
Diffstat (limited to 'libpod/runtime_img_test.go')
-rw-r--r-- | libpod/runtime_img_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libpod/runtime_img_test.go b/libpod/runtime_img_test.go index f7f7128a4..c608c1b25 100644 --- a/libpod/runtime_img_test.go +++ b/libpod/runtime_img_test.go @@ -6,6 +6,7 @@ import ( "reflect" "testing" + sysreg "github.com/projectatomic/libpod/pkg/registries" "github.com/stretchr/testify/assert" ) @@ -38,7 +39,7 @@ func TestGetRegistries(t *testing.T) { assert.NoError(t, err) defer os.Remove(registryPath) os.Setenv("REGISTRIES_CONFIG_PATH", registryPath) - registries, err := GetRegistries() + registries, err := sysreg.GetRegistries() assert.NoError(t, err) assert.True(t, reflect.DeepEqual(registries, []string{"one"})) } @@ -48,7 +49,7 @@ func TestGetInsecureRegistries(t *testing.T) { assert.NoError(t, err) os.Setenv("REGISTRIES_CONFIG_PATH", registryPath) defer os.Remove(registryPath) - registries, err := GetInsecureRegistries() + registries, err := sysreg.GetInsecureRegistries() assert.NoError(t, err) assert.True(t, reflect.DeepEqual(registries, []string{"two"})) } |