When Team City kicks off a Test Kitchen run for a freshly completed Chocolatey component version, and while the Test Kitchen is running a new version of the component is published to internal feeds, this particular test reports a failure:
Expected 0, because Chocolatey v1.2.0-alpha-20220813-1f34adf2 Business
Outdated Packages
Output is package name | current version | available version | pinned?
chocolatey-agent|1.1.0-alpha-20220818-67|1.1.0-alpha-20220818-68|false
Chocolatey has determined 1 package(s) are outdated., but got 2.
at $Output.ExitCode | Should -Be $ExitCode -Because $Output.String, C:\Users\Administrator\AppData\Local\Temp\verifier\suites\chocolatey-service-tests\chocolatey-licensed-tests\chocolatey-tests\choco-outdated.Tests.ps1:26
at <ScriptBlock>, C:\Users\Administrator\AppData\Local\Temp\verifier\suites\chocolatey-service-tests\chocolatey-licensed-tests\chocolatey-tests\choco-outdated.Tests.ps1:26
What is Expected?
This test should not fail, because in this case the package is expected to be outdated.
How Did You Get This To Happen? (Steps to Reproduce)
In this specific instance:
Chocolatey Agent PR was merged to develop branch
Team City kicks off the chained Test Kitchen build
Another Chocolatey Agent PR was merged to develop branch while the Test Kitchen build is running
Test Kitchen fails this specific test
Team City kicks off a chained Test Kitchen build for step 3's version
Test Kitchen succeeds this test (assuming no further merges to develop
System Details
Test Kitchen related, occurs on both 2016 and 2019 kitchens
Output Log
Output from the Team City email:
Failed tests summary: 2 (2 new)
(new) Pester - <chocolatey-service-tests-windows-2016>: choco outdated.outdated ignore-pinned uses correct enhanced exit codes.Exits with correct exit code (0) details »
(new) Pester - <chocolatey-service-tests-windows-2019>: choco outdated.outdated ignore-pinned uses correct enhanced exit codes.Exits with correct exit code (0) details »
Stacktraces:
(new) Pester - <chocolatey-service-tests-windows-2016>: choco outdated.outdated ignore-pinned uses correct enhanced exit codes.Exits with correct exit code (0)
Expected 0, because Chocolatey v1.2.0-alpha-20220813-1f34adf2 Business
Outdated Packages
Output is package name | current version | available version | pinned?
chocolatey-agent|1.1.0-alpha-20220818-67|1.1.0-alpha-20220818-68|false
Chocolatey has determined 1 package(s) are outdated., but got 2.
at $Output.ExitCode | Should -Be $ExitCode -Because $Output.String, C:\Users\Administrator\AppData\Local\Temp\verifier\suites\chocolatey-service-tests\chocolatey-licensed-tests\chocolatey-tests\choco-outdated.Tests.ps1:26
at <ScriptBlock>, C:\Users\Administrator\AppData\Local\Temp\verifier\suites\chocolatey-service-tests\chocolatey-licensed-tests\chocolatey-tests\choco-outdated.Tests.ps1:26
(new) Pester - <chocolatey-service-tests-windows-2019>: choco outdated.outdated ignore-pinned uses correct enhanced exit codes.Exits with correct exit code (0)
Expected 0, because Chocolatey v1.2.0-alpha-20220813-1f34adf2 Business
Outdated Packages
Output is package name | current version | available version | pinned?
chocolatey-agent|1.1.0-alpha-20220818-67|1.1.0-alpha-20220818-68|false
Chocolatey has determined 1 package(s) are outdated., but got 2.
at $Output.ExitCode | Should -Be $ExitCode -Because $Output.String, C:\Users\Administrator\AppData\Local\Temp\verifier\suites\chocolatey-service-tests\chocolatey-licensed-tests\chocolatey-tests\choco-outdated.Tests.ps1:26
at <ScriptBlock>, C:\Users\Administrator\AppData\Local\Temp\verifier\suites\chocolatey-service-tests\chocolatey-licensed-tests\chocolatey-tests\choco-outdated.Tests.ps1:26
Proposed solution: Maintain a list of internal Chocolatey components that are pinned during the setup of these tests. As they sometimes encounter the described scenario, they should rightly be pinned for this particular test.
What You Are Seeing?
When Team City kicks off a Test Kitchen run for a freshly completed Chocolatey component version, and while the Test Kitchen is running a new version of the component is published to internal feeds, this particular test reports a failure:
What is Expected?
This test should not fail, because in this case the package is expected to be outdated.
How Did You Get This To Happen? (Steps to Reproduce)
In this specific instance:
develop
branchdevelop
branch while the Test Kitchen build is runningdevelop
System Details
Test Kitchen related, occurs on both 2016 and 2019 kitchens
Output Log
Output from the Team City email:
Proposed solution: Maintain a list of internal Chocolatey components that are pinned during the setup of these tests. As they sometimes encounter the described scenario, they should rightly be pinned for this particular test.