diff options
author | Miloslav Trmač <mitr@redhat.com> | 2022-07-30 01:50:45 +0200 |
---|---|---|
committer | Miloslav Trmač <mitr@redhat.com> | 2022-08-02 16:52:56 +0200 |
commit | 2303632250168b0d856d4fcfe0b5d1a77ca8b873 (patch) | |
tree | 68d56089c23976c992d547407658f9b89d99d386 /test/e2e/login_logout_test.go | |
parent | 74155705e4486a0bec0ca2606926ed27b37ed962 (diff) | |
download | podman-2303632250168b0d856d4fcfe0b5d1a77ca8b873.tar.gz podman-2303632250168b0d856d4fcfe0b5d1a77ca8b873.tar.bz2 podman-2303632250168b0d856d4fcfe0b5d1a77ca8b873.zip |
Use httpasswd from the surrouding OS instead of the registry image
htpasswd is no longer included in docker.io/library/distribution
after 2.7.0, per https://github.com/docker/distribution-library-image/issues/107 ,
and we want to upgrade to a recent version.
At least system tests currently execute htpasswd from the OS,
so it seems that it is likely to be available.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Diffstat (limited to 'test/e2e/login_logout_test.go')
-rw-r--r-- | test/e2e/login_logout_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/e2e/login_logout_test.go b/test/e2e/login_logout_test.go index 3ae130c6d..efefbb113 100644 --- a/test/e2e/login_logout_test.go +++ b/test/e2e/login_logout_test.go @@ -52,15 +52,15 @@ var _ = Describe("Podman login and logout", func() { } } - session := podmanTest.Podman([]string{"run", "--entrypoint", "htpasswd", "registry:2.6", "-Bbn", "podmantest", "test"}) - session.WaitWithDefaultTimeout() - Expect(session).Should(Exit(0)) + htpasswd := SystemExec("htpasswd", []string{"-Bbn", "podmantest", "test"}) + htpasswd.WaitWithDefaultTimeout() + Expect(htpasswd).Should(Exit(0)) f, err := os.Create(filepath.Join(authPath, "htpasswd")) Expect(err).ToNot(HaveOccurred()) defer f.Close() - _, err = f.WriteString(session.OutputToString()) + _, err = f.WriteString(htpasswd.OutputToString()) Expect(err).ToNot(HaveOccurred()) err = f.Sync() Expect(err).ToNot(HaveOccurred()) @@ -80,7 +80,7 @@ var _ = Describe("Podman login and logout", func() { setup := SystemExec("cp", []string{filepath.Join(certPath, "domain.crt"), filepath.Join(certDirPath, "ca.crt")}) setup.WaitWithDefaultTimeout() - session = podmanTest.Podman([]string{"run", "-d", "-p", strings.Join([]string{strconv.Itoa(port), strconv.Itoa(port)}, ":"), + session := podmanTest.Podman([]string{"run", "-d", "-p", strings.Join([]string{strconv.Itoa(port), strconv.Itoa(port)}, ":"), "-e", strings.Join([]string{"REGISTRY_HTTP_ADDR=0.0.0.0", strconv.Itoa(port)}, ":"), "--name", "registry", "-v", strings.Join([]string{authPath, "/auth:Z"}, ":"), "-e", "REGISTRY_AUTH=htpasswd", "-e", "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm", "-e", "REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd", |