Skip to content

Commit 5e59796

Browse files
lindluniCopilot
andcommitted
fix: align test assertion with updated log messages
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Brett Logan <lindluni@github.com>
1 parent a0ed6e3 commit 5e59796

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/OctoshiftCLI.Tests/Octoshift/Services/CodeScanningAlertServiceTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,8 @@ public async Task MigrateAnalyses_Skips_Analyses_With_Error_And_Logs_Warning()
347347

348348
await _alertService.MigrateAnalyses(SOURCE_ORG, SOURCE_REPO, TARGET_ORG, TARGET_REPO, "main", false);
349349

350-
_mockOctoLogger.Verify(log => log.LogWarning($"Skipping analysis {errorAnalysis.Id} due to error: something went wrong"));
350+
_mockOctoLogger.Verify(log => log.LogWarning($"Skipping analysis with Id {errorAnalysis.Id} which failed to process in the source repository: something went wrong"));
351+
_mockOctoLogger.Verify(log => log.LogWarning(" This error is non-fatal and will not affect your migrated code-scanning alerts."));
351352
_mockSourceGithubApi.Verify(x => x.GetSarifReport(SOURCE_ORG, SOURCE_REPO, errorAnalysis.Id), Times.Never);
352353
_mockTargetGithubApi.Verify(x => x.UploadSarifReport(TARGET_ORG, TARGET_REPO, "SARIF", validAnalysis.CommitSha, validAnalysis.Ref), Times.Once);
353354
}

0 commit comments

Comments
 (0)