Skip to content

Commit

Permalink
Fix unit test failure.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhaus67 committed Jan 3, 2023
1 parent 4839d6d commit f9c9f37
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,12 +297,11 @@ type testCase struct {
func NewTestCase(tc junit.Test, env map[string]string) testCase {
jobSpec := env["JOB_SPEC"]
baseLink := gjson.Get(jobSpec, "refs.base_link").String()
return testCase{
c := testCase{
Name: tc.Name,
Message: tc.Message,
Stdout: tc.SystemOut,
Stderr: tc.SystemErr,
Error: tc.Error.Error(),
Suite: tc.Classname,
BuildId: env["BUILD_ID"],
Cluster: env["CLUSTER_NAME"],
Expand All @@ -311,6 +310,11 @@ func NewTestCase(tc junit.Test, env map[string]string) testCase {
BuildTag: env["STACKROX_BUILD_TAG"],
BaseLink: baseLink,
}

if tc.Error != nil {
c.Error = tc.Error.Error()
}
return c
}

func (tc *testCase) description() (string, error) {
Expand Down

0 comments on commit f9c9f37

Please sign in to comment.