Skip to content

Commit

Permalink
Fix issues with vcr status and logs (#9987)
Browse files Browse the repository at this point in the history
* Fix issues with vcr status and logs

* Report success if recording succeeds, not replaying after recording
  • Loading branch information
trodge committed Feb 15, 2024
1 parent cacc4c8 commit 1253916
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .ci/magician/cmd/test_terraform_vcr.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ Affected tests: ` + fmt.Sprintf("`%d`", len(replayingResult.FailedTests)) + `
recordingResult, recordingErr := vt.RunParallel(vcr.Recording, provider.Beta, testDirs, replayingResult.FailedTests)
if recordingErr != nil {
testState = "failure"
} else {
testState = "success"
}

if err := vt.UploadCassettes("ci-vcr-cassettes", prNumber, provider.Beta); err != nil {
Expand Down Expand Up @@ -200,7 +202,7 @@ Affected tests: ` + fmt.Sprintf("`%d`", len(replayingResult.FailedTests)) + `
testState = "failure"
}

if err := vt.UploadLogs("ci-vcr-logs", prNumber, buildID, true, false, vcr.Recording, provider.Beta); err != nil {
if err := vt.UploadLogs("ci-vcr-logs", prNumber, buildID, true, true, vcr.Replaying, provider.Beta); err != nil {
fmt.Println("Error uploading recording logs: ", err)
os.Exit(1)
}
Expand Down

0 comments on commit 1253916

Please sign in to comment.