Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions tests/e2e/standalone/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,21 +117,17 @@ func executeAgainstRunningDapr(t *testing.T, f func(), daprArgs ...string) {
}

err := cmd.Wait()
hasAppCommand := !strings.Contains(daprOutput, "WARNING: no application command found")
if err != nil {
var exitErr *exec.ExitError
if errors.As(err, &exitErr) && exitErr.ExitCode() == 1 &&
strings.Contains(daprOutput, "Exited Dapr successfully") &&
(!hasAppCommand || strings.Contains(daprOutput, "Exited App successfully")) {
!strings.Contains(daprOutput, "The App process exited with error code: exit status") {
err = nil
}
}
require.NoError(t, err, "dapr didn't exit cleanly")
assert.NotContains(t, daprOutput, "The App process exited with error code: exit status", "Stop command should have been called before the app had a chance to exit")
assert.Contains(t, daprOutput, "Exited Dapr successfully")
if hasAppCommand {
assert.Contains(t, daprOutput, "Exited App successfully")
}
}

// ensureDaprInstallation ensures that Dapr is installed.
Expand Down
Loading