From de0718ec96f047730c42c8b5ca34a5bb77948c36 Mon Sep 17 00:00:00 2001 From: John McPherson Date: Mon, 27 Apr 2020 21:51:21 -0700 Subject: [PATCH] Update test for name change to package and have all tests run in the pipeline even if other passes fail --- azure-pipelines.yml | 8 ++++++++ src/AppInstallerCLIE2ETests/SourceCommand.cs | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 75bd2a7ea4..a9c0e222d5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -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 @@ -157,6 +158,7 @@ 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 @@ -164,6 +166,7 @@ jobs: 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 @@ -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 @@ -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 @@ -214,6 +219,7 @@ jobs: -AICLIPath AppInstallerCLI\AppInstallerCLI.exe -LooseFileRegistration true -InvokeCommandInDesktopPackage true' + condition: succeededOrFailed() - task: VSTest@2 displayName: Run E2E Tests Unpackaged x86 @@ -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 @@ -235,6 +242,7 @@ jobs: -AICLIPath AppInstallerCLI\AppInstallerCLI.exe -LooseFileRegistration true -InvokeCommandInDesktopPackage true' + condition: succeededOrFailed() - task: PublishBuildArtifacts@1 displayName: Publish CLI Binary diff --git a/src/AppInstallerCLIE2ETests/SourceCommand.cs b/src/AppInstallerCLIE2ETests/SourceCommand.cs index 4c118f4167..aedd6c66f4 100644 --- a/src/AppInstallerCLIE2ETests/SourceCommand.cs +++ b/src/AppInstallerCLIE2ETests/SourceCommand.cs @@ -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