diff --git a/integration/docker_test.go b/integration/docker_test.go index 1419ff5..9f88b09 100644 --- a/integration/docker_test.go +++ b/integration/docker_test.go @@ -425,6 +425,9 @@ func TestDocker(t *testing.T) { HostKeyPath: regKeyPath, Image: integrationtest.UbuntuImage, TLSPort: strconv.Itoa(registryAddr.Port), + PasswordDir: dir, + Username: "user", + Password: "password", }) envs := []string{ diff --git a/integration/integrationtest/os.go b/integration/integrationtest/os.go index 45aacd7..dc13318 100644 --- a/integration/integrationtest/os.go +++ b/integration/integrationtest/os.go @@ -17,6 +17,12 @@ func TmpDir(t *testing.T) string { tmpdir, err := os.MkdirTemp("", strings.ReplaceAll(t.Name(), "/", "_")) require.NoError(t, err) t.Logf("using tmpdir %s", tmpdir) + t.Cleanup(func() { + if !t.Failed() { + // Could be useful in case of test failure. + _ = os.RemoveAll(tmpdir) + } + }) return tmpdir }