Skip to content

Commit

Permalink
Fixing tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Psichorex committed Feb 27, 2024
1 parent f8a4957 commit 92dd809
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,15 @@ public Task FullSecurityScanShouldPass() =>
}),
changeConfiguration: configuration => configuration.AssertAppLogsAsync = async webApplicationInstance =>
{
var logsWithoutFalseIOExpection = (await webApplicationInstance.GetLogOutputAsync())
var logsWithoutUnwantedExpectionMessages = (await webApplicationInstance.GetLogOutputAsync())
.SplitByNewLines()
.Where(message =>
!message.ContainsOrdinalIgnoreCase("System.IO.DirectoryNotFoundException: Could not find a part of the path"));
!message.ContainsOrdinalIgnoreCase("System.IO.DirectoryNotFoundException: Could not find a part of the path") &&
!message.ContainsOrdinalIgnoreCase(
"System.IO.IOException: The filename, directory name, or volume label syntax is incorrect") &&
!message.ContainsOrdinalIgnoreCase("System.InvalidOperationException: This action intentionally causes an exception!"));
logsWithoutFalseIOExpection.ShouldNotContain(item => item.Contains("|ERROR|"));
logsWithoutUnwantedExpectionMessages.ShouldNotContain(item => item.Contains("|ERROR|"));
});

private static void FalsePositive(
Expand Down

0 comments on commit 92dd809

Please sign in to comment.