Skip to content

Commit

Permalink
(chocolatey#3526) Validate version numbers in Info logs
Browse files Browse the repository at this point in the history
This updates the tests to validate that the version number is not
output in the Info log messages only. There are some debug log messages
that may contain a similar version number as they report the user agent
being used, this prevents them from being erroneously picked up.
  • Loading branch information
corbob committed Nov 8, 2024
1 parent 8e7582f commit be0ae44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/chocolatey.tests.integration/scenarios/ListScenarios.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public void Should_contain_package_name()
[Fact]
public void Should_not_contain_any_version_number()
{
MockLogger.ContainsMessage(".0").Should().BeFalse();
MockLogger.ContainsMessage(".0", LogLevel.Info).Should().BeFalse();
}
}

Expand Down Expand Up @@ -196,7 +196,7 @@ public void Should_contain_packages_id()
[Fact]
public void Should_not_contain_any_version_number()
{
MockLogger.ContainsMessage(".0").Should().BeFalse();
MockLogger.ContainsMessage(".0", LogLevel.Info).Should().BeFalse();
}

[Fact]
Expand Down

0 comments on commit be0ae44

Please sign in to comment.