mirror of
https://github.com/docker/compose.git
synced 2026-08-04 14:47:40 +00:00
fix: update e2e tests to expect exit code 130 on user decline
Signed-off-by: Ishwar <ishwarcm@iitbhilai.ac.in>
This commit is contained in:
parent
37cbf7a9cd
commit
1e3f4d0f4a
2 changed files with 2 additions and 4 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue