Skip to content

Commit

Permalink
PS Gallery tests are unreliable (microsoft#4791)
Browse files Browse the repository at this point in the history
## Change
These tests that rely on the PowerShell Gallery are unreliable. Disable
them.
  • Loading branch information
JohnMcPMS authored Sep 4, 2024
1 parent 8996d9b commit 33bae58
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/AppInstallerCLIE2ETests/ConfigureCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public void OneTimeTeardown()
/// Intentionally has no settings to force a failure, but only after acquiring the module.
/// </summary>
[Test]
[Ignore("PS Gallery tests are unreliable.")]
public void ConfigureFromGallery()
{
TestCommon.EnsureModuleState(Constants.GalleryTestModuleName, present: false);
Expand Down
1 change: 1 addition & 0 deletions src/AppInstallerCLIE2ETests/ConfigureShowCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public void OneTimeTearDown()
/// Simple test to confirm that a resource without a module specified can be discovered in the PSGallery.
/// </summary>
[Test]
[Ignore("PS Gallery tests are unreliable.")]
public void ShowDetailsFromGallery()
{
TestCommon.EnsureModuleState(Constants.GalleryTestModuleName, present: false);
Expand Down
8 changes: 6 additions & 2 deletions src/PowerShell/tests/Microsoft.WinGet.Configuration.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,8 @@ Describe 'Invoke-WinGetConfiguration' {
BeforeEach {
DeleteConfigTxtFiles
}


<# PS Gallery tests are unreliable.
It 'From Gallery' {
EnsureModuleState "XmlContentDsc" $false
Expand All @@ -366,6 +367,7 @@ Describe 'Invoke-WinGetConfiguration' {
$result.UnitResults[0].State | Should -Be "Completed"
$result.UnitResults[0].ResultCode | Should -Be -1978285819
}
#>

It 'From TestRepo' {
EnsureModuleState $e2eTestModule $false
Expand Down Expand Up @@ -530,7 +532,8 @@ Describe 'Start|Complete-WinGetConfiguration' {
BeforeEach {
DeleteConfigTxtFiles
}


<# PS Gallery tests are unreliable.
It 'From Gallery' {
EnsureModuleState "XmlContentDsc" $false
Expand All @@ -548,6 +551,7 @@ Describe 'Start|Complete-WinGetConfiguration' {
$result.UnitResults[0].State | Should -Be "Completed"
$result.UnitResults[0].ResultCode | Should -Be -1978285819
}
#>

It 'From TestRepo' {
$testFile = GetConfigTestDataFile "Configure_TestRepo.yml"
Expand Down

0 comments on commit 33bae58

Please sign in to comment.