Skip to content

Commit

Permalink
fix: Add startup failure state to run conclusion
Browse files Browse the repository at this point in the history
Closes #271
  • Loading branch information
valentin-krasontovitsch authored and sumanmaity1234 committed Apr 17, 2023
1 parent b86d300 commit 8b8ac04
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ public enum RunConclusion {
@JsonProperty("failure")
FAILURE,

@JsonProperty("startup_failure")
STARTUP_FAILURE,

@JsonProperty("neutral")
NEUTRAL,

Expand All @@ -32,7 +35,7 @@ public static Status getStatus(RunConclusion conclusion) {
}
return switch (conclusion) {
case SUCCESS, SKIPPED -> Status.SUCCESS;
case FAILURE, CANCELLED, TIMED_OUT -> Status.FAILURE;
case FAILURE, STARTUP_FAILURE, CANCELLED, TIMED_OUT -> Status.FAILURE;
case ACTION_REQUIRED -> Status.EXCEPTION;
default -> Status.UNKNOWN;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ void shouldGiveSuccessStatus(RunConclusion conclusion) {
@ParameterizedTest(name = "should give FAILURE status for {0} conclusion")
@EnumSource(
value = RunConclusion.class,
names = {"TIMED_OUT", "CANCELLED", "FAILURE"})
names = {"TIMED_OUT", "CANCELLED", "FAILURE", "STARTUP_FAILURE"})
void shouldGiveFailureStatus(RunConclusion conclusion) {
assertThat(RunConclusion.getStatus(conclusion)).isEqualTo(Status.FAILURE);
}
Expand Down

0 comments on commit 8b8ac04

Please sign in to comment.