From 27e6d4f07f5001a1db1272a6e9fc16dfdc325c0f Mon Sep 17 00:00:00 2001 From: Cory Knox Date: Thu, 7 Nov 2024 12:13:48 -0800 Subject: [PATCH] (#3502) Update tests to disable extra sources The Test Kitchen environment has both `hermes` and `hermes-all` enabled. This results in a duplication of the warning message. This disables all the sources and then enables just the `hermes` source. # Please enter the commit message for your changes. Lines starting --- tests/pester-tests/features/PageSize.Tests.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/pester-tests/features/PageSize.Tests.ps1 b/tests/pester-tests/features/PageSize.Tests.ps1 index a0b846522..f6bedb51d 100644 --- a/tests/pester-tests/features/PageSize.Tests.ps1 +++ b/tests/pester-tests/features/PageSize.Tests.ps1 @@ -34,6 +34,8 @@ } ) { BeforeAll { + Disable-ChocolateySource + Enable-ChocolateySource -Name hermes $Output = Invoke-Choco $Command --page-size $ProvidedSize } @@ -55,8 +57,6 @@ } } foreach ($message in $ExpectedMessage) { - # The output here may contain duplicated line for the warning about non-30 page size. - # We have been unable to reproduce this output in any scenario other than in these tests. $Output.Lines | Should -Contain $message -Because $Output.String } }