Skip to content

Commit

Permalink
Fix pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
bnshr committed Aug 29, 2024
1 parent 3be8d60 commit 81392e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/claimhelper/claimhelper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func TestMarshalClaimOutput(t *testing.T) {

// Check if the output is a valid JSON
//nolint:lll
assert.Contains(t, string(output), "{\n \"claim\": {\n \"configurations\": null,\n \"metadata\": {\n \"endTime\": \"2023-12-20 14:51:34 -0600 MST\",\n \"startTime\": \"2023-12-20 14:51:33 -0600 MST\"\n },\n \"nodes\": null,\n \"results\": {\n \"test-case1\": {\n \"capturedTestOutput\": \"\",\n \"catalogInfo\": null,\n \"categoryClassification\": null,\n \"checkDetails\": \"\",\n \"duration\": 0,\n \"failureLineContent\": \"\",\n \"failureLocation\": \"\",\n \"skipReason\": \"\",\n \"startTime\": \"\",\n \"state\": \"failed\",\n \"testID\": {\n \"id\": \"test-case1\",\n \"suite\": \"test-suite1\",\n \"tags\": \"\"\n }\n }\n },\n \"versions\": {\n \"claimFormat\": \"\",\n \"k8s\": \"\",\n \"ocClient\": \"\",\n \"ocp\": \"\",\n \"certsuite\": \"1.0.0\",\n \"certsuiteGitCommit\": \"\"\n }\n }\n}")
assert.Contains(t, string(output), "{\n \"claim\": {\n \"configurations\": null,\n \"metadata\": {\n \"endTime\": \"2023-12-20 14:51:34 -0600 MST\",\n \"startTime\": \"2023-12-20 14:51:33 -0600 MST\"\n },\n \"nodes\": null,\n \"results\": {\n \"test-case1\": {\n \"capturedTestOutput\": \"\",\n \"catalogInfo\": null,\n \"categoryClassification\": null,\n \"checkDetails\": \"\",\n \"duration\": 0,\n \"failureLineContent\": \"\",\n \"failureLocation\": \"\",\n \"skipReason\": \"\",\n \"startTime\": \"\",\n \"state\": \"failed\",\n \"testID\": {\n \"id\": \"test-case1\",\n \"suite\": \"test-suite1\",\n \"tags\": \"\"\n }\n }\n },\n \"versions\": {\n \"certSuite\": \"1.0.0\",\n \"certSuiteGitCommit\": \"\",\n \"claimFormat\": \"\",\n \"k8s\": \"\",\n \"ocClient\": \"\",\n \"ocp\": \"\"\n }\n }\n}")
}

func TestWriteClaimOutput(t *testing.T) {
Expand Down Expand Up @@ -266,7 +266,7 @@ func TestWriteClaimOutput(t *testing.T) {

// Check if the output is a valid JSON
//nolint:lll
assert.Contains(t, string(output), "{\n \"claim\": {\n \"configurations\": null,\n \"metadata\": {\n \"endTime\": \"2023-12-20 14:51:34 -0600 MST\",\n \"startTime\": \"2023-12-20 14:51:33 -0600 MST\"\n },\n \"nodes\": null,\n \"results\": {\n \"test-case1\": {\n \"capturedTestOutput\": \"\",\n \"catalogInfo\": null,\n \"categoryClassification\": null,\n \"checkDetails\": \"\",\n \"duration\": 0,\n \"failureLineContent\": \"\",\n \"failureLocation\": \"\",\n \"skipReason\": \"\",\n \"startTime\": \"\",\n \"state\": \"failed\",\n \"testID\": {\n \"id\": \"test-case1\",\n \"suite\": \"test-suite1\",\n \"tags\": \"\"\n }\n }\n },\n \"versions\": {\n \"claimFormat\": \"\",\n \"k8s\": \"\",\n \"ocClient\": \"\",\n \"ocp\": \"\",\n \"certsuite\": \"1.0.0\",\n \"certsuiteGitCommit\": \"\"\n }\n }\n}")
assert.Contains(t, string(output), "{\n \"claim\": {\n \"configurations\": null,\n \"metadata\": {\n \"endTime\": \"2023-12-20 14:51:34 -0600 MST\",\n \"startTime\": \"2023-12-20 14:51:33 -0600 MST\"\n },\n \"nodes\": null,\n \"results\": {\n \"test-case1\": {\n \"capturedTestOutput\": \"\",\n \"catalogInfo\": null,\n \"categoryClassification\": null,\n \"checkDetails\": \"\",\n \"duration\": 0,\n \"failureLineContent\": \"\",\n \"failureLocation\": \"\",\n \"skipReason\": \"\",\n \"startTime\": \"\",\n \"state\": \"failed\",\n \"testID\": {\n \"id\": \"test-case1\",\n \"suite\": \"test-suite1\",\n \"tags\": \"\"\n }\n }\n },\n \"versions\": {\n \"certSuite\": \"1.0.0\",\n \"certSuiteGitCommit\": \"\",\n \"claimFormat\": \"\",\n \"k8s\": \"\",\n \"ocClient\": \"\",\n \"ocp\": \"\"\n }\n }\n}")

// Assert the file permissions are 0644
fileInfo, err := os.Stat(outputFile)
Expand Down

0 comments on commit 81392e2

Please sign in to comment.