diff --git a/pkg/compose/publish_test.go b/pkg/compose/publish_test.go index 31932632f..3b0e5a438 100644 --- a/pkg/compose/publish_test.go +++ b/pkg/compose/publish_test.go @@ -104,7 +104,6 @@ services: } func Test_preChecks_sensitive_data_detected_decline(t *testing.T) { - dir := t.TempDir() envPath := dir + "/secrets.env" secretData := `AWS_SECRET_ACCESS_KEY="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"` @@ -112,7 +111,6 @@ func Test_preChecks_sensitive_data_detected_decline(t *testing.T) { assert.NilError(t, err) project := &types.Project{ - Services: types.Services{ "web": { Name: "web", diff --git a/pkg/e2e/publish_test.go b/pkg/e2e/publish_test.go index b5488df60..1dd83d031 100644 --- a/pkg/e2e/publish_test.go +++ b/pkg/e2e/publish_test.go @@ -71,7 +71,7 @@ or remove sensitive data from your Compose configuration "-p", projectName, "publish", "test/test", "--dry-run") cmd.Stdin = strings.NewReader("n\n") res := icmd.RunCmd(cmd) - res.Assert(t, icmd.Expected{ExitCode: 0}) + res.Assert(t, icmd.Expected{ExitCode: 130}) out := res.Combined() assert.Assert(t, strings.Contains(out, "you are about to publish bind mounts declaration within your OCI artifact."), out) assert.Assert(t, strings.Contains(out, "e2e/fixtures/publish:/user-data"), out) @@ -111,7 +111,7 @@ or remove sensitive data from your Compose configuration "-p", projectName, "publish", "test/test", "--with-env", "--dry-run") cmd.Stdin = strings.NewReader("n\n") res := icmd.RunCmd(cmd) - res.Assert(t, icmd.Expected{ExitCode: 0}) + res.Assert(t, icmd.Expected{ExitCode: 130}) output := res.Combined() assert.Assert(t, strings.Contains(output, "you are about to publish sensitive data within your OCI artifact.\n"), output)