Skip to content

Commit

Permalink
Update test for name change to package and have all tests run in the …
Browse files Browse the repository at this point in the history
…pipeline even if other passes fail
  • Loading branch information
JohnMcPMS committed Apr 28, 2020
1 parent 3d2ec3a commit de0718e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ jobs:
script: |
AppInstallerCLITests.exe -logto AICLI-Unpackaged-x86.log -s -r junit -o TEST-AppInstallerCLI-Unpackaged-x86.xml
workingDirectory: 'src\x86\Release\AppInstallerCLITests\'
condition: succeededOrFailed()

- task: PublishBuildArtifacts@1
displayName: Publish Unit Tests Unpackaged Log x86
Expand All @@ -157,13 +158,15 @@ jobs:
script: |
Add-AppxPackage AppInstallerCLIPackage_0.0.0.2_Test\Dependencies\x86\Microsoft.VCLibs.x86.14.00.Desktop.appx
workingDirectory: $(appxPackageDir)
condition: succeededOrFailed()

- task: PowerShell@2
displayName: Run Unit Tests Packaged x86
inputs:
filePath: 'src\AppInstallerCLITests\Run-TestsInPackage.ps1'
arguments: '-Args "~[pips]" -BuildRoot x86\Release -PackageRoot AppInstallerCLIPackage\bin\x86\Release -LogTarget x86\Release\AICLI-Packaged-x86.log -TestResultsTarget x86\Release\TEST-AppInstallerCLI-Packaged-x86.xml -ScriptWait'
workingDirectory: 'src'
condition: succeededOrFailed()

- task: PublishBuildArtifacts@1
displayName: Publish Unit Tests Packaged Log x86
Expand Down Expand Up @@ -193,6 +196,7 @@ jobs:
displayName: Prepare VSTest for E2E Tests
inputs:
packageFeedSelector: 'nugetOrg'
condition: succeededOrFailed()

- task: VSTest@2
displayName: Run E2E Tests Unpackaged x64
Expand All @@ -202,6 +206,7 @@ jobs:
runSettingsFile: 'src\AnyCPU\Release\AppInstallerCLIE2ETests\Test.runsettings'
overrideTestrunParameters: '-PackagedContext false
-AICLIPath $(system.defaultWorkingDirectory)\src\x64\Release\AppInstallerCLI\AppInstallerCLI.exe'
condition: succeededOrFailed()

- task: VSTest@2
displayName: Run E2E Tests Packaged x64
Expand All @@ -214,6 +219,7 @@ jobs:
-AICLIPath AppInstallerCLI\AppInstallerCLI.exe
-LooseFileRegistration true
-InvokeCommandInDesktopPackage true'
condition: succeededOrFailed()

- task: VSTest@2
displayName: Run E2E Tests Unpackaged x86
Expand All @@ -223,6 +229,7 @@ jobs:
runSettingsFile: 'src\AnyCPU\Release\AppInstallerCLIE2ETests\Test.runsettings'
overrideTestrunParameters: '-PackagedContext false
-AICLIPath $(system.defaultWorkingDirectory)\src\x86\Release\AppInstallerCLI\AppInstallerCLI.exe'
condition: succeededOrFailed()

- task: VSTest@2
displayName: Run E2E Tests Packaged x86
Expand All @@ -235,6 +242,7 @@ jobs:
-AICLIPath AppInstallerCLI\AppInstallerCLI.exe
-LooseFileRegistration true
-InvokeCommandInDesktopPackage true'
condition: succeededOrFailed()

- task: PublishBuildArtifacts@1
displayName: Publish CLI Binary
Expand Down
2 changes: 1 addition & 1 deletion src/AppInstallerCLIE2ETests/SourceCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void SourceCommands()
Assert.AreEqual(Constants.ErrorCode.S_OK, result.ExitCode);
Assert.True(result.StdOut.Contains("SourceTestSource"));
Assert.True(result.StdOut.Contains("https://winget-int.azureedge.net/cache"));
Assert.True(result.StdOut.Contains("AppInstallerSQLiteIndex-int"));
Assert.True(result.StdOut.Contains("Microsoft.Winget.Source.int"));
Assert.True(result.StdOut.Contains("Updated"));

// List when source name does not match
Expand Down

0 comments on commit de0718e

Please sign in to comment.