Skip to content

Commit

Permalink
Added separate fields to store failure reason, details and logs (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
edcdavid committed Dec 14, 2023
1 parent 32a8def commit 3014cd0
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 21 deletions.
54 changes: 40 additions & 14 deletions pkg/claim/schema.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions pkg/claim/schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ func TestResult_MarshalJSON(t *testing.T) {
EndTime string
FailureLineContent string
FailureLocation string
FailureReason string
SkipReason string
CheckDetails string
StartTime string
State string
TestID *Identifier
Expand All @@ -124,7 +125,8 @@ func TestResult_MarshalJSON(t *testing.T) {
EndTime: tt.fields.EndTime,
FailureLineContent: tt.fields.FailureLineContent,
FailureLocation: tt.fields.FailureLocation,
FailureReason: tt.fields.FailureReason,
SkipReason: tt.fields.SkipReason,
CheckDetails: tt.fields.CheckDetails,
StartTime: tt.fields.StartTime,
State: tt.fields.State,
TestID: tt.fields.TestID,
Expand Down Expand Up @@ -174,7 +176,7 @@ func TestResult_UnmarshalJSON(t *testing.T) { //nolint:funlen
EndTime: "2023-07-25 09:10:25.557493221 -0500 CDT m=+51.038323513",
FailureLineContent: "",
FailureLocation: ":0",
FailureReason: "",
SkipReason: "",
StartTime: "2023-07-25 09:10:17.812172748 -0500 CDT m=+43.293003040",
State: "passed",
TestID: &Identifier{
Expand Down Expand Up @@ -203,7 +205,8 @@ func TestResult_UnmarshalJSON(t *testing.T) { //nolint:funlen
"endTime": "2023-07-25 09:10:25.557493221 -0500 CDT m=+51.038323513",
"failureLineContent": "",
"failureLocation": ":0",
"failureReason": "",
"skipReason": "",
"checkDetails": "",
"startTime": "2023-07-25 09:10:17.812172748 -0500 CDT m=+43.293003040",
"state": "passed",
"testID": {
Expand Down
11 changes: 8 additions & 3 deletions schemas/claim.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,13 @@
"type": "string",
"description": "The test result state: INVALID SPEC STATE, pending,skipped,passed,failed,aborted,panicked,interrupted"
},
"failureReason": {
"skipReason": {
"type": "string",
"description": "Describes the test failure in detail."
"description": "Describes the reasons for not running a test (skipped, aborted, panicked, interrupted)"
},
"checkDetails": {
"type": "string",
"description": "Described the reasons for passing or failing a test"
},
"duration": {
"type": "integer",
Expand Down Expand Up @@ -82,7 +86,8 @@
"failureLocation",
"failureLineContent",
"state",
"failureReason",
"skipReason",
"checkDetails",
"duration",
"startTime",
"capturedTestOutput",
Expand Down

0 comments on commit 3014cd0

Please sign in to comment.