From 125391685be1c603329ca249f5d233c21396effa Mon Sep 17 00:00:00 2001 From: Thomas Rodgers Date: Thu, 15 Feb 2024 13:13:40 -0800 Subject: [PATCH] Fix issues with vcr status and logs (#9987) * Fix issues with vcr status and logs * Report success if recording succeeds, not replaying after recording --- .ci/magician/cmd/test_terraform_vcr.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.ci/magician/cmd/test_terraform_vcr.go b/.ci/magician/cmd/test_terraform_vcr.go index 99ca6cd74a81..2749ddd586c0 100644 --- a/.ci/magician/cmd/test_terraform_vcr.go +++ b/.ci/magician/cmd/test_terraform_vcr.go @@ -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 { @@ -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) }