Skip to content

Commit 15b801c

Browse files
chore: fix flaky test (#544)
1 parent 3e71117 commit 15b801c

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

pkg/cmd/release/deploy/deploy_test.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -776,17 +776,15 @@ func TestDeployCreate_AskQuestions(t *testing.T) {
776776
emptyDeploymentPreviews := fixtures.EmptyDeploymentPreviews()
777777
api.ExpectRequest(t, "POST", "/api/Spaces-1/releases/"+release19.ID+"/deployments/previews").RespondWith(&emptyDeploymentPreviews)
778778

779-
assert.Equal(t, heredoc.Doc(`
780-
Project Fire Project
781-
Release 1.9
782-
`), stdout.String())
783-
stdout.Reset()
784-
785779
q := qa.ExpectQuestion(t, &survey.Select{
786780
Message: "Change additional options?",
787781
Options: []string{"Proceed to deploy", "Change"},
788782
})
789-
assert.Regexp(t, "Additional Options", stdout.String()) // actual options tested in PrintAdvancedSummary
783+
784+
output := stdout.String()
785+
assert.Contains(t, output, "Project Fire Project")
786+
assert.Contains(t, output, "Release 1.9")
787+
assert.Contains(t, output, "Additional Options:") // actual options tested in PrintAdvancedSummary
790788
_ = q.AnswerWith("Proceed to deploy")
791789

792790
err := <-errReceiver

0 commit comments

Comments
 (0)