diff --git a/test/e2e/template/helmfile/.gitignore b/test/e2e/template/helmfile/.gitignore new file mode 100644 index 00000000..17d6b367 --- /dev/null +++ b/test/e2e/template/helmfile/.gitignore @@ -0,0 +1 @@ +/*.tgz diff --git a/test/e2e/template/helmfile/snapshot_test.go b/test/e2e/template/helmfile/snapshot_test.go index e00ac8a2..eb565f79 100644 --- a/test/e2e/template/helmfile/snapshot_test.go +++ b/test/e2e/template/helmfile/snapshot_test.go @@ -106,12 +106,15 @@ func TestHelmfileTemplateWithBuildCommand(t *testing.T) { hostPort = 5000 } - execDocker(t, "run", "-d", "-p", fmt.Sprintf("%d:5000", hostPort), "--restart=always", "--name", containerName, "registry:2") + execDocker(t, "run", "--rm", "-d", "-p", fmt.Sprintf("%d:5000", hostPort), "--name", containerName, "registry:2") t.Cleanup(func() { execDocker(t, "stop", containerName) - execDocker(t, "rm", containerName) }) + // FIXME: this is a hack to wait for registry to be up and running + // please replace with proper wait for registry + time.Sleep(5 * time.Second) + // We helm-package and helm-push every test chart saved in the ./testdata/charts directory // to the local registry, so that they can be accessed by helmfile and helm invoked while testing. charts, err := os.ReadDir(chartsDir)