Skip to content

Commit 47b5af8

Browse files
committed
minor comments
1 parent e669725 commit 47b5af8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

integration/integrationtest/docker.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ func waitForRegistry(t testing.TB, pool *dockertest.Pool, resource *dockertest.R
462462
func pushLocalImage(t testing.TB, pool *dockertest.Pool, host, remoteImage string) RegistryImage {
463463
t.Helper()
464464

465+
const registryHost = "127.0.0.1"
465466
name := filepath.Base(remoteImage)
466467
repoTag := strings.Split(name, ":")
467468
tag := "latest"
@@ -483,12 +484,14 @@ func pushLocalImage(t testing.TB, pool *dockertest.Pool, host, remoteImage strin
483484
require.NoError(t, err)
484485

485486
err = pool.Client.TagImage(remoteImage, docker.TagImageOptions{
486-
Repo: fmt.Sprintf("%s:%s/%s", "127.0.0.1", port, name),
487+
Repo: fmt.Sprintf("%s:%s/%s", registryHost, port, name),
487488
Tag: tag,
488489
})
489490
require.NoError(t, err)
490491

491-
image := fmt.Sprintf("%s:%s/%s:%s", "127.0.0.1", port, name, tag)
492+
// Idk what to tell you but the pool.Client.PushImage
493+
// function is bugged or I'm just dumb...
494+
image := fmt.Sprintf("%s:%s/%s:%s", registryHost, port, name, tag)
492495
cmd := exec.Command("docker", "push", image)
493496
cmd.Stderr = tw
494497
cmd.Stdout = tw

0 commit comments

Comments
 (0)