Skip to content

Commit

Permalink
Update e2e/vm/finch_config_file_test.go
Browse files Browse the repository at this point in the history
Co-authored-by: Vishwas Siravara <vsiravara@gmail.com>
Signed-off-by: Ang Zhou <angzh@amazon.com>
  • Loading branch information
azhouwd and vsiravar committed Mar 28, 2023
1 parent 87c6163 commit 6300a6c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions e2e/vm/finch_config_file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ var testFinchConfigFile = func(o *option.Option) {
htpasswdDir := filepath.Dir(ffs.CreateTempFile(filename, htpasswd))
ginkgo.DeferCleanup(os.RemoveAll, htpasswdDir)
port := fnet.GetFreePort()
containerId := command.StdoutStr(o, "run",

containerID := command.StdoutStr(o, "run",
"-dp", fmt.Sprintf("%d:5000", port),
"--name", registryContainer,
"-v", fmt.Sprintf("%s:/auth", htpasswdDir),
Expand All @@ -47,7 +46,9 @@ var testFinchConfigFile = func(o *option.Option) {
registryImage)
ginkgo.DeferCleanup(command.Run, o, "rmi", registryImage)
ginkgo.DeferCleanup(command.Run, o, "rm", "-f", registryContainer)
time.Sleep(2 * time.Second)
for command.StdoutStr(o, "inspect", "-f", "{{.State.Running}}", containerID) != "true" {
time.Sleep(1 * time.Second)
}
registry := fmt.Sprintf(`localhost:%d`, port)
command.Run(o, "login", registry, "-u", "testUser", "-p", "testPassword")

Expand Down

0 comments on commit 6300a6c

Please sign in to comment.