diff --git a/pkg/executor/push_test.go b/pkg/executor/push_test.go index 2b0d06e5e..54eda4654 100644 --- a/pkg/executor/push_test.go +++ b/pkg/executor/push_test.go @@ -355,6 +355,7 @@ func TestCheckPushPermissions(t *testing.T) { } if test.ExistingConfig { afero.WriteFile(fs, DockerConfLocation, []byte(""), os.FileMode(0644)) + defer fs.Remove(DockerConfLocation) } CheckPushPermissions(&opts) if test.ShouldCallExecCommand != calledExecCommand {