From 9cc82c0b9936b96093ec0124d6330a144ac0fe1a Mon Sep 17 00:00:00 2001 From: Yao Sun Date: Thu, 18 Aug 2022 20:22:50 -0700 Subject: [PATCH 1/3] Try to see if e2e fails --- .../manifests/v1.4.0/manifest.defaultLocale.1.4.0.json | 2 +- .../JSON/manifests/v1.4.0/manifest.installer.1.4.0.json | 2 +- schemas/JSON/manifests/v1.4.0/manifest.locale.1.4.0.json | 2 +- .../JSON/manifests/v1.4.0/manifest.singleton.1.4.0.json | 2 +- schemas/JSON/manifests/v1.4.0/manifest.version.1.4.0.json | 2 +- src/AppInstallerCLIE2ETests/Constants.cs | 2 +- src/AppInstallerCLIE2ETests/ImportCommand.cs | 2 +- src/AppInstallerCLIE2ETests/InstallCommand.cs | 6 +++--- src/AppInstallerCLIE2ETests/Interop/InstallInterop.cs | 8 ++++---- src/AppInstallerCLIE2ETests/ListCommand.cs | 4 ++-- src/AppInstallerCLIE2ETests/SearchCommand.cs | 2 +- .../ImportFiles/ImportFile-Bad-UnknownPackageVersion.json | 2 +- .../ImportFiles/ImportFile-Bad-UnknownSource.json | 2 +- .../TestData/ImportFiles/ImportFile-Good.1.0.json | 2 +- .../TestData/ImportFiles/ImportFile-Good.2.0.json | 2 +- .../TestData/Manifests/TestExeInstaller.2.0.0.0.yaml | 2 +- .../TestData/Manifests/TestExeInstaller.yaml | 2 +- 17 files changed, 23 insertions(+), 23 deletions(-) diff --git a/schemas/JSON/manifests/v1.4.0/manifest.defaultLocale.1.4.0.json b/schemas/JSON/manifests/v1.4.0/manifest.defaultLocale.1.4.0.json index 5f4f38468d..6822d3e702 100644 --- a/schemas/JSON/manifests/v1.4.0/manifest.defaultLocale.1.4.0.json +++ b/schemas/JSON/manifests/v1.4.0/manifest.defaultLocale.1.4.0.json @@ -56,7 +56,7 @@ "properties": { "PackageIdentifier": { "type": "string", - "pattern": "^[^\\.\\s\\\\/:\\*\\?\"<>\\|\\x01-\\x1f]{1,32}(\\.[^\\.\\s\\\\/:\\*\\?\"<>\\|\\x01-\\x1f]{1,32}){1,3}$", + "pattern": "^[^\\.\\s\\\\/:\\*\\?\"<>\\|\\x01-\\x1f]{1,32}(\\.[^\\.\\s\\\\/:\\*\\?\"<>\\|\\x01-\\x1f]{1,32}){1,7}$", "maxLength": 128, "description": "The package unique identifier" }, diff --git a/schemas/JSON/manifests/v1.4.0/manifest.installer.1.4.0.json b/schemas/JSON/manifests/v1.4.0/manifest.installer.1.4.0.json index ca41f4f689..1f4475e977 100644 --- a/schemas/JSON/manifests/v1.4.0/manifest.installer.1.4.0.json +++ b/schemas/JSON/manifests/v1.4.0/manifest.installer.1.4.0.json @@ -5,7 +5,7 @@ "definitions": { "PackageIdentifier": { "type": "string", - "pattern": "^[^\\.\\s\\\\/:\\*\\?\"<>\\|\\x01-\\x1f]{1,32}(\\.[^\\.\\s\\\\/:\\*\\?\"<>\\|\\x01-\\x1f]{1,32}){1,3}$", + "pattern": "^[^\\.\\s\\\\/:\\*\\?\"<>\\|\\x01-\\x1f]{1,32}(\\.[^\\.\\s\\\\/:\\*\\?\"<>\\|\\x01-\\x1f]{1,32}){1,7}$", "maxLength": 128, "description": "The package unique identifier" }, diff --git a/schemas/JSON/manifests/v1.4.0/manifest.locale.1.4.0.json b/schemas/JSON/manifests/v1.4.0/manifest.locale.1.4.0.json index 5ff3318103..46be2e3fdf 100644 --- a/schemas/JSON/manifests/v1.4.0/manifest.locale.1.4.0.json +++ b/schemas/JSON/manifests/v1.4.0/manifest.locale.1.4.0.json @@ -56,7 +56,7 @@ "properties": { "PackageIdentifier": { "type": "string", - "pattern": "^[^\\.\\s\\\\/:\\*\\?\"<>\\|\\x01-\\x1f]{1,32}(\\.[^\\.\\s\\\\/:\\*\\?\"<>\\|\\x01-\\x1f]{1,32}){1,3}$", + "pattern": "^[^\\.\\s\\\\/:\\*\\?\"<>\\|\\x01-\\x1f]{1,32}(\\.[^\\.\\s\\\\/:\\*\\?\"<>\\|\\x01-\\x1f]{1,32}){1,7}$", "maxLength": 128, "description": "The package unique identifier" }, diff --git a/schemas/JSON/manifests/v1.4.0/manifest.singleton.1.4.0.json b/schemas/JSON/manifests/v1.4.0/manifest.singleton.1.4.0.json index 3c76c764e4..51bbbbf630 100644 --- a/schemas/JSON/manifests/v1.4.0/manifest.singleton.1.4.0.json +++ b/schemas/JSON/manifests/v1.4.0/manifest.singleton.1.4.0.json @@ -5,7 +5,7 @@ "definitions": { "PackageIdentifier": { "type": "string", - "pattern": "^[^\\.\\s\\\\/:\\*\\?\"<>\\|\\x01-\\x1f]{1,32}(\\.[^\\.\\s\\\\/:\\*\\?\"<>\\|\\x01-\\x1f]{1,32}){1,3}$", + "pattern": "^[^\\.\\s\\\\/:\\*\\?\"<>\\|\\x01-\\x1f]{1,32}(\\.[^\\.\\s\\\\/:\\*\\?\"<>\\|\\x01-\\x1f]{1,32}){1,7}$", "maxLength": 128, "description": "The package unique identifier" }, diff --git a/schemas/JSON/manifests/v1.4.0/manifest.version.1.4.0.json b/schemas/JSON/manifests/v1.4.0/manifest.version.1.4.0.json index 1415a03847..2ca282ebe3 100644 --- a/schemas/JSON/manifests/v1.4.0/manifest.version.1.4.0.json +++ b/schemas/JSON/manifests/v1.4.0/manifest.version.1.4.0.json @@ -6,7 +6,7 @@ "properties": { "PackageIdentifier": { "type": "string", - "pattern": "^[^\\.\\s\\\\/:\\*\\?\"<>\\|\\x01-\\x1f]{1,32}(\\.[^\\.\\s\\\\/:\\*\\?\"<>\\|\\x01-\\x1f]{1,32}){1,3}$", + "pattern": "^[^\\.\\s\\\\/:\\*\\?\"<>\\|\\x01-\\x1f]{1,32}(\\.[^\\.\\s\\\\/:\\*\\?\"<>\\|\\x01-\\x1f]{1,32}){1,7}$", "maxLength": 128, "description": "The package unique identifier" }, diff --git a/src/AppInstallerCLIE2ETests/Constants.cs b/src/AppInstallerCLIE2ETests/Constants.cs index b2d034d42f..9d384ad7e8 100644 --- a/src/AppInstallerCLIE2ETests/Constants.cs +++ b/src/AppInstallerCLIE2ETests/Constants.cs @@ -60,7 +60,7 @@ public class Constants public const string AppInstallerTestExeInstallerExe = "AppInstallerTestExeInstaller.exe"; // Test installers' package IDs - public const string ExeInstallerPackageId = "AppInstallerTest.TestExeInstaller"; + public const string ExeInstallerPackageId = "App.Installer.Test.Test.Exe.Installer"; public const string MsiInstallerPackageId = "AppInstallerTest.TestMsiInstaller"; public const string MsixInstallerPackageId = "AppInstallerTest.TestMsixInstaller"; public const string PortableExePackageId = "AppInstallerTest.TestPortableExe"; diff --git a/src/AppInstallerCLIE2ETests/ImportCommand.cs b/src/AppInstallerCLIE2ETests/ImportCommand.cs index 4f60fed0fc..a5a42b28dd 100644 --- a/src/AppInstallerCLIE2ETests/ImportCommand.cs +++ b/src/AppInstallerCLIE2ETests/ImportCommand.cs @@ -74,7 +74,7 @@ public void ImportAlreadyInstalled() { // Verify success with message when trying to import a package that is already installed var installDir = TestCommon.GetRandomTestDir(); - TestCommon.RunAICLICommand("install", $"AppInstallerTest.TestExeInstaller -l {installDir}"); + TestCommon.RunAICLICommand("install", $"App.Installer.Test.Test.Exe.Installer -l {installDir}"); var result = TestCommon.RunAICLICommand("import", $"{GetTestImportFile("ImportFile-Good.1.0.json")}"); Assert.AreEqual(Constants.ErrorCode.S_OK, result.ExitCode); Assert.True(result.StdOut.Contains("Package is already installed")); diff --git a/src/AppInstallerCLIE2ETests/InstallCommand.cs b/src/AppInstallerCLIE2ETests/InstallCommand.cs index 503276b9eb..1fcda4fc05 100644 --- a/src/AppInstallerCLIE2ETests/InstallCommand.cs +++ b/src/AppInstallerCLIE2ETests/InstallCommand.cs @@ -34,7 +34,7 @@ public void InstallWithMultipleAppsMatchingQuery() public void InstallExe() { var installDir = TestCommon.GetRandomTestDir(); - var result = TestCommon.RunAICLICommand("install", $"AppInstallerTest.TestExeInstaller --silent -l {installDir}"); + var result = TestCommon.RunAICLICommand("install", $"App.Installer.Test.Test.Exe.Installer --silent -l {installDir}"); Assert.AreEqual(Constants.ErrorCode.S_OK, result.ExitCode); Assert.True(result.StdOut.Contains("Successfully installed")); Assert.True(TestCommon.VerifyTestExeInstalledAndCleanup(installDir, "/execustom")); @@ -139,10 +139,10 @@ public void InstallExeWithAlternateSourceFailure() try { var installDir = TestCommon.GetRandomTestDir(); - var result = TestCommon.RunAICLICommand("install", $"AppInstallerTest.TestExeInstaller --silent -l {installDir}"); + var result = TestCommon.RunAICLICommand("install", $"App.Installer.Test.Test.Exe.Installer --silent -l {installDir}"); Assert.AreEqual(unchecked((int)0x80070002), result.ExitCode); Assert.True(result.StdOut.Contains("Failed when searching source: failSearch")); - Assert.True(result.StdOut.Contains("AppInstallerTest.TestExeInstaller")); + Assert.True(result.StdOut.Contains("App.Installer.Test.Test.Exe.Installer")); Assert.False(result.StdOut.Contains("Successfully installed")); Assert.False(TestCommon.VerifyTestExeInstalledAndCleanup(installDir)); } diff --git a/src/AppInstallerCLIE2ETests/Interop/InstallInterop.cs b/src/AppInstallerCLIE2ETests/Interop/InstallInterop.cs index 23aa75e842..153bea228a 100644 --- a/src/AppInstallerCLIE2ETests/Interop/InstallInterop.cs +++ b/src/AppInstallerCLIE2ETests/Interop/InstallInterop.cs @@ -32,7 +32,7 @@ public void SetUp() public async Task InstallExe() { // Find package - var searchResult = FindOnePackage(testSource, PackageMatchField.Id, PackageFieldMatchOption.Equals, "AppInstallerTest.TestExeInstaller"); + var searchResult = FindOnePackage(testSource, PackageMatchField.Id, PackageFieldMatchOption.Equals, "App.Installer.Test.Test.Exe.Installer"); // Configure installation var installOptions = TestFactory.CreateInstallOptions(); @@ -232,7 +232,7 @@ public void InstallExeWithAlternateSourceFailure() var failSearchSource = packageManager.GetPackageCatalogByName("failSearch"); // Find package - var searchResult = FindAllPackages(failSearchSource, PackageMatchField.Id, PackageFieldMatchOption.Equals, "AppInstallerTest.TestExeInstaller"); + var searchResult = FindAllPackages(failSearchSource, PackageMatchField.Id, PackageFieldMatchOption.Equals, "App.Installer.Test.Test.Exe.Installer"); // Assert Assert.NotNull(failSearchSource); @@ -353,7 +353,7 @@ public async Task InstallPortableFailsWithCleanup() public async Task InstallRequireUserScope() { // Find package - var searchResult = FindOnePackage(testSource, PackageMatchField.Id, PackageFieldMatchOption.Equals, "AppInstallerTest.TestExeInstaller"); + var searchResult = FindOnePackage(testSource, PackageMatchField.Id, PackageFieldMatchOption.Equals, "App.Installer.Test.Test.Exe.Installer"); // Configure installation var installOptions = TestFactory.CreateInstallOptions(); @@ -373,7 +373,7 @@ public async Task InstallRequireUserScope() public async Task InstallRequireUserScopeAndUnknown() { // Find package - var searchResult = FindOnePackage(testSource, PackageMatchField.Id, PackageFieldMatchOption.Equals, "AppInstallerTest.TestExeInstaller"); + var searchResult = FindOnePackage(testSource, PackageMatchField.Id, PackageFieldMatchOption.Equals, "App.Installer.Test.Test.Exe.Installer"); // Configure installation var installOptions = TestFactory.CreateInstallOptions(); diff --git a/src/AppInstallerCLIE2ETests/ListCommand.cs b/src/AppInstallerCLIE2ETests/ListCommand.cs index 169c4947af..b20b66cf8b 100644 --- a/src/AppInstallerCLIE2ETests/ListCommand.cs +++ b/src/AppInstallerCLIE2ETests/ListCommand.cs @@ -31,12 +31,12 @@ public void ListAfterInstall() var result = TestCommon.RunAICLICommand("list", productCode); Assert.AreEqual(Constants.ErrorCode.ERROR_NO_APPLICATIONS_FOUND, result.ExitCode); - result = TestCommon.RunAICLICommand("install", $"AppInstallerTest.TestExeInstaller --override \"/InstallDir {installDir} /ProductID {productCode} /LogFile {logFilePath} /DisplayName {displayName}\""); + result = TestCommon.RunAICLICommand("install", $"App.Installer.Test.Test.Exe.Installer --override \"/InstallDir {installDir} /ProductID {productCode} /LogFile {logFilePath} /DisplayName {displayName}\""); Assert.AreEqual(Constants.ErrorCode.S_OK, result.ExitCode); result = TestCommon.RunAICLICommand("list", productCode); Assert.AreEqual(Constants.ErrorCode.S_OK, result.ExitCode); - Assert.True(result.StdOut.Contains("AppInstallerTest.TestExeInstaller")); + Assert.True(result.StdOut.Contains("App.Installer.Test.Test.Exe.Installer")); Assert.True(result.StdOut.Contains("1.0.0.0")); Assert.True(result.StdOut.Contains("2.0.0.0")); } diff --git a/src/AppInstallerCLIE2ETests/SearchCommand.cs b/src/AppInstallerCLIE2ETests/SearchCommand.cs index aca227fca3..7e02c948a9 100644 --- a/src/AppInstallerCLIE2ETests/SearchCommand.cs +++ b/src/AppInstallerCLIE2ETests/SearchCommand.cs @@ -63,7 +63,7 @@ public void SearchReturnsMultiple() // Search Microsoft should return multiple var result = TestCommon.RunAICLICommand("search", "AppInstallerTest"); Assert.AreEqual(Constants.ErrorCode.S_OK, result.ExitCode); - Assert.True(result.StdOut.Contains("AppInstallerTest.TestExeInstaller")); + Assert.True(result.StdOut.Contains("App.Installer.Test.Test.Exe.Installer")); Assert.True(result.StdOut.Contains("AppInstallerTest.TestBurnInstaller")); Assert.True(result.StdOut.Contains("AppInstallerTest.TestExampleInstaller")); } diff --git a/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Bad-UnknownPackageVersion.json b/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Bad-UnknownPackageVersion.json index c35641d3f2..4eb178d19e 100644 --- a/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Bad-UnknownPackageVersion.json +++ b/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Bad-UnknownPackageVersion.json @@ -5,7 +5,7 @@ { "Packages": [ { - "PackageIdentifier": "AppInstallerTest.TestExeInstaller", + "PackageIdentifier": "App.Installer.Test.Test.Exe.Installer", "Version": "4.3.2.1" } ], diff --git a/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Bad-UnknownSource.json b/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Bad-UnknownSource.json index 13c63b2ce1..c5086e79ba 100644 --- a/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Bad-UnknownSource.json +++ b/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Bad-UnknownSource.json @@ -5,7 +5,7 @@ { "Packages": [ { - "Id": "AppInstallerTest.TestExeInstaller", + "Id": "App.Installer.Test.Test.Exe.Installer", "Version": "1.0.0.0" } ], diff --git a/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Good.1.0.json b/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Good.1.0.json index f513feaa9a..1b145cbb86 100644 --- a/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Good.1.0.json +++ b/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Good.1.0.json @@ -5,7 +5,7 @@ { "Packages": [ { - "Id": "AppInstallerTest.TestExeInstaller", + "Id": "App.Installer.Test.Test.Exe.Installer", "Version": "1.0.0.0" } ], diff --git a/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Good.2.0.json b/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Good.2.0.json index d3b2ba4c43..22a6746de8 100644 --- a/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Good.2.0.json +++ b/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Good.2.0.json @@ -5,7 +5,7 @@ { "Packages": [ { - "PackageIdentifier": "AppInstallerTest.TestExeInstaller", + "PackageIdentifier": "App.Installer.Test.Test.Exe.Installer", "Version": "1.0.0.0" } ], diff --git a/src/AppInstallerCLIE2ETests/TestData/Manifests/TestExeInstaller.2.0.0.0.yaml b/src/AppInstallerCLIE2ETests/TestData/Manifests/TestExeInstaller.2.0.0.0.yaml index f2d6af8541..abef23daca 100644 --- a/src/AppInstallerCLIE2ETests/TestData/Manifests/TestExeInstaller.2.0.0.0.yaml +++ b/src/AppInstallerCLIE2ETests/TestData/Manifests/TestExeInstaller.2.0.0.0.yaml @@ -1,4 +1,4 @@ -Id: AppInstallerTest.TestExeInstaller +Id: App.Installer.Test.Test.Exe.Installer Name: TestExeInstaller Version: 2.0.0.0 Publisher: AppInstallerTest diff --git a/src/AppInstallerCLIE2ETests/TestData/Manifests/TestExeInstaller.yaml b/src/AppInstallerCLIE2ETests/TestData/Manifests/TestExeInstaller.yaml index 85e3be9e8e..1dd2cb5a25 100644 --- a/src/AppInstallerCLIE2ETests/TestData/Manifests/TestExeInstaller.yaml +++ b/src/AppInstallerCLIE2ETests/TestData/Manifests/TestExeInstaller.yaml @@ -1,4 +1,4 @@ -Id: AppInstallerTest.TestExeInstaller +Id: App.Installer.Test.Test.Exe.Installer Name: TestExeInstaller Version: 1.0.0.0 Publisher: AppInstallerTest From 6b55135e892d3e695f5430b542b1551365cb287f Mon Sep 17 00:00:00 2001 From: Yao Sun Date: Fri, 19 Aug 2022 12:51:58 -0700 Subject: [PATCH 2/3] revert --- src/AppInstallerCLIE2ETests/Constants.cs | 2 +- src/AppInstallerCLIE2ETests/ImportCommand.cs | 2 +- src/AppInstallerCLIE2ETests/InstallCommand.cs | 6 +++--- src/AppInstallerCLIE2ETests/Interop/InstallInterop.cs | 8 ++++---- src/AppInstallerCLIE2ETests/ListCommand.cs | 4 ++-- src/AppInstallerCLIE2ETests/SearchCommand.cs | 2 +- .../ImportFiles/ImportFile-Bad-UnknownPackageVersion.json | 2 +- .../ImportFiles/ImportFile-Bad-UnknownSource.json | 2 +- .../TestData/ImportFiles/ImportFile-Good.1.0.json | 2 +- .../TestData/ImportFiles/ImportFile-Good.2.0.json | 2 +- .../TestData/Manifests/TestExeInstaller.2.0.0.0.yaml | 2 +- .../TestData/Manifests/TestExeInstaller.yaml | 2 +- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/AppInstallerCLIE2ETests/Constants.cs b/src/AppInstallerCLIE2ETests/Constants.cs index 9d384ad7e8..b2d034d42f 100644 --- a/src/AppInstallerCLIE2ETests/Constants.cs +++ b/src/AppInstallerCLIE2ETests/Constants.cs @@ -60,7 +60,7 @@ public class Constants public const string AppInstallerTestExeInstallerExe = "AppInstallerTestExeInstaller.exe"; // Test installers' package IDs - public const string ExeInstallerPackageId = "App.Installer.Test.Test.Exe.Installer"; + public const string ExeInstallerPackageId = "AppInstallerTest.TestExeInstaller"; public const string MsiInstallerPackageId = "AppInstallerTest.TestMsiInstaller"; public const string MsixInstallerPackageId = "AppInstallerTest.TestMsixInstaller"; public const string PortableExePackageId = "AppInstallerTest.TestPortableExe"; diff --git a/src/AppInstallerCLIE2ETests/ImportCommand.cs b/src/AppInstallerCLIE2ETests/ImportCommand.cs index a5a42b28dd..4f60fed0fc 100644 --- a/src/AppInstallerCLIE2ETests/ImportCommand.cs +++ b/src/AppInstallerCLIE2ETests/ImportCommand.cs @@ -74,7 +74,7 @@ public void ImportAlreadyInstalled() { // Verify success with message when trying to import a package that is already installed var installDir = TestCommon.GetRandomTestDir(); - TestCommon.RunAICLICommand("install", $"App.Installer.Test.Test.Exe.Installer -l {installDir}"); + TestCommon.RunAICLICommand("install", $"AppInstallerTest.TestExeInstaller -l {installDir}"); var result = TestCommon.RunAICLICommand("import", $"{GetTestImportFile("ImportFile-Good.1.0.json")}"); Assert.AreEqual(Constants.ErrorCode.S_OK, result.ExitCode); Assert.True(result.StdOut.Contains("Package is already installed")); diff --git a/src/AppInstallerCLIE2ETests/InstallCommand.cs b/src/AppInstallerCLIE2ETests/InstallCommand.cs index 1fcda4fc05..503276b9eb 100644 --- a/src/AppInstallerCLIE2ETests/InstallCommand.cs +++ b/src/AppInstallerCLIE2ETests/InstallCommand.cs @@ -34,7 +34,7 @@ public void InstallWithMultipleAppsMatchingQuery() public void InstallExe() { var installDir = TestCommon.GetRandomTestDir(); - var result = TestCommon.RunAICLICommand("install", $"App.Installer.Test.Test.Exe.Installer --silent -l {installDir}"); + var result = TestCommon.RunAICLICommand("install", $"AppInstallerTest.TestExeInstaller --silent -l {installDir}"); Assert.AreEqual(Constants.ErrorCode.S_OK, result.ExitCode); Assert.True(result.StdOut.Contains("Successfully installed")); Assert.True(TestCommon.VerifyTestExeInstalledAndCleanup(installDir, "/execustom")); @@ -139,10 +139,10 @@ public void InstallExeWithAlternateSourceFailure() try { var installDir = TestCommon.GetRandomTestDir(); - var result = TestCommon.RunAICLICommand("install", $"App.Installer.Test.Test.Exe.Installer --silent -l {installDir}"); + var result = TestCommon.RunAICLICommand("install", $"AppInstallerTest.TestExeInstaller --silent -l {installDir}"); Assert.AreEqual(unchecked((int)0x80070002), result.ExitCode); Assert.True(result.StdOut.Contains("Failed when searching source: failSearch")); - Assert.True(result.StdOut.Contains("App.Installer.Test.Test.Exe.Installer")); + Assert.True(result.StdOut.Contains("AppInstallerTest.TestExeInstaller")); Assert.False(result.StdOut.Contains("Successfully installed")); Assert.False(TestCommon.VerifyTestExeInstalledAndCleanup(installDir)); } diff --git a/src/AppInstallerCLIE2ETests/Interop/InstallInterop.cs b/src/AppInstallerCLIE2ETests/Interop/InstallInterop.cs index 153bea228a..23aa75e842 100644 --- a/src/AppInstallerCLIE2ETests/Interop/InstallInterop.cs +++ b/src/AppInstallerCLIE2ETests/Interop/InstallInterop.cs @@ -32,7 +32,7 @@ public void SetUp() public async Task InstallExe() { // Find package - var searchResult = FindOnePackage(testSource, PackageMatchField.Id, PackageFieldMatchOption.Equals, "App.Installer.Test.Test.Exe.Installer"); + var searchResult = FindOnePackage(testSource, PackageMatchField.Id, PackageFieldMatchOption.Equals, "AppInstallerTest.TestExeInstaller"); // Configure installation var installOptions = TestFactory.CreateInstallOptions(); @@ -232,7 +232,7 @@ public void InstallExeWithAlternateSourceFailure() var failSearchSource = packageManager.GetPackageCatalogByName("failSearch"); // Find package - var searchResult = FindAllPackages(failSearchSource, PackageMatchField.Id, PackageFieldMatchOption.Equals, "App.Installer.Test.Test.Exe.Installer"); + var searchResult = FindAllPackages(failSearchSource, PackageMatchField.Id, PackageFieldMatchOption.Equals, "AppInstallerTest.TestExeInstaller"); // Assert Assert.NotNull(failSearchSource); @@ -353,7 +353,7 @@ public async Task InstallPortableFailsWithCleanup() public async Task InstallRequireUserScope() { // Find package - var searchResult = FindOnePackage(testSource, PackageMatchField.Id, PackageFieldMatchOption.Equals, "App.Installer.Test.Test.Exe.Installer"); + var searchResult = FindOnePackage(testSource, PackageMatchField.Id, PackageFieldMatchOption.Equals, "AppInstallerTest.TestExeInstaller"); // Configure installation var installOptions = TestFactory.CreateInstallOptions(); @@ -373,7 +373,7 @@ public async Task InstallRequireUserScope() public async Task InstallRequireUserScopeAndUnknown() { // Find package - var searchResult = FindOnePackage(testSource, PackageMatchField.Id, PackageFieldMatchOption.Equals, "App.Installer.Test.Test.Exe.Installer"); + var searchResult = FindOnePackage(testSource, PackageMatchField.Id, PackageFieldMatchOption.Equals, "AppInstallerTest.TestExeInstaller"); // Configure installation var installOptions = TestFactory.CreateInstallOptions(); diff --git a/src/AppInstallerCLIE2ETests/ListCommand.cs b/src/AppInstallerCLIE2ETests/ListCommand.cs index b20b66cf8b..169c4947af 100644 --- a/src/AppInstallerCLIE2ETests/ListCommand.cs +++ b/src/AppInstallerCLIE2ETests/ListCommand.cs @@ -31,12 +31,12 @@ public void ListAfterInstall() var result = TestCommon.RunAICLICommand("list", productCode); Assert.AreEqual(Constants.ErrorCode.ERROR_NO_APPLICATIONS_FOUND, result.ExitCode); - result = TestCommon.RunAICLICommand("install", $"App.Installer.Test.Test.Exe.Installer --override \"/InstallDir {installDir} /ProductID {productCode} /LogFile {logFilePath} /DisplayName {displayName}\""); + result = TestCommon.RunAICLICommand("install", $"AppInstallerTest.TestExeInstaller --override \"/InstallDir {installDir} /ProductID {productCode} /LogFile {logFilePath} /DisplayName {displayName}\""); Assert.AreEqual(Constants.ErrorCode.S_OK, result.ExitCode); result = TestCommon.RunAICLICommand("list", productCode); Assert.AreEqual(Constants.ErrorCode.S_OK, result.ExitCode); - Assert.True(result.StdOut.Contains("App.Installer.Test.Test.Exe.Installer")); + Assert.True(result.StdOut.Contains("AppInstallerTest.TestExeInstaller")); Assert.True(result.StdOut.Contains("1.0.0.0")); Assert.True(result.StdOut.Contains("2.0.0.0")); } diff --git a/src/AppInstallerCLIE2ETests/SearchCommand.cs b/src/AppInstallerCLIE2ETests/SearchCommand.cs index 7e02c948a9..aca227fca3 100644 --- a/src/AppInstallerCLIE2ETests/SearchCommand.cs +++ b/src/AppInstallerCLIE2ETests/SearchCommand.cs @@ -63,7 +63,7 @@ public void SearchReturnsMultiple() // Search Microsoft should return multiple var result = TestCommon.RunAICLICommand("search", "AppInstallerTest"); Assert.AreEqual(Constants.ErrorCode.S_OK, result.ExitCode); - Assert.True(result.StdOut.Contains("App.Installer.Test.Test.Exe.Installer")); + Assert.True(result.StdOut.Contains("AppInstallerTest.TestExeInstaller")); Assert.True(result.StdOut.Contains("AppInstallerTest.TestBurnInstaller")); Assert.True(result.StdOut.Contains("AppInstallerTest.TestExampleInstaller")); } diff --git a/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Bad-UnknownPackageVersion.json b/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Bad-UnknownPackageVersion.json index 4eb178d19e..c35641d3f2 100644 --- a/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Bad-UnknownPackageVersion.json +++ b/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Bad-UnknownPackageVersion.json @@ -5,7 +5,7 @@ { "Packages": [ { - "PackageIdentifier": "App.Installer.Test.Test.Exe.Installer", + "PackageIdentifier": "AppInstallerTest.TestExeInstaller", "Version": "4.3.2.1" } ], diff --git a/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Bad-UnknownSource.json b/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Bad-UnknownSource.json index c5086e79ba..13c63b2ce1 100644 --- a/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Bad-UnknownSource.json +++ b/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Bad-UnknownSource.json @@ -5,7 +5,7 @@ { "Packages": [ { - "Id": "App.Installer.Test.Test.Exe.Installer", + "Id": "AppInstallerTest.TestExeInstaller", "Version": "1.0.0.0" } ], diff --git a/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Good.1.0.json b/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Good.1.0.json index 1b145cbb86..f513feaa9a 100644 --- a/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Good.1.0.json +++ b/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Good.1.0.json @@ -5,7 +5,7 @@ { "Packages": [ { - "Id": "App.Installer.Test.Test.Exe.Installer", + "Id": "AppInstallerTest.TestExeInstaller", "Version": "1.0.0.0" } ], diff --git a/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Good.2.0.json b/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Good.2.0.json index 22a6746de8..d3b2ba4c43 100644 --- a/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Good.2.0.json +++ b/src/AppInstallerCLIE2ETests/TestData/ImportFiles/ImportFile-Good.2.0.json @@ -5,7 +5,7 @@ { "Packages": [ { - "PackageIdentifier": "App.Installer.Test.Test.Exe.Installer", + "PackageIdentifier": "AppInstallerTest.TestExeInstaller", "Version": "1.0.0.0" } ], diff --git a/src/AppInstallerCLIE2ETests/TestData/Manifests/TestExeInstaller.2.0.0.0.yaml b/src/AppInstallerCLIE2ETests/TestData/Manifests/TestExeInstaller.2.0.0.0.yaml index abef23daca..f2d6af8541 100644 --- a/src/AppInstallerCLIE2ETests/TestData/Manifests/TestExeInstaller.2.0.0.0.yaml +++ b/src/AppInstallerCLIE2ETests/TestData/Manifests/TestExeInstaller.2.0.0.0.yaml @@ -1,4 +1,4 @@ -Id: App.Installer.Test.Test.Exe.Installer +Id: AppInstallerTest.TestExeInstaller Name: TestExeInstaller Version: 2.0.0.0 Publisher: AppInstallerTest diff --git a/src/AppInstallerCLIE2ETests/TestData/Manifests/TestExeInstaller.yaml b/src/AppInstallerCLIE2ETests/TestData/Manifests/TestExeInstaller.yaml index 1dd2cb5a25..85e3be9e8e 100644 --- a/src/AppInstallerCLIE2ETests/TestData/Manifests/TestExeInstaller.yaml +++ b/src/AppInstallerCLIE2ETests/TestData/Manifests/TestExeInstaller.yaml @@ -1,4 +1,4 @@ -Id: App.Installer.Test.Test.Exe.Installer +Id: AppInstallerTest.TestExeInstaller Name: TestExeInstaller Version: 1.0.0.0 Publisher: AppInstallerTest From 32bda782580e92550062c8f95a3528b103588bff Mon Sep 17 00:00:00 2001 From: Yao Sun Date: Fri, 19 Aug 2022 14:40:44 -0700 Subject: [PATCH 3/3] Add manifest schemas path to pr validation --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 49dc947512..b8aed9dfaa 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -11,6 +11,7 @@ pr: include: - azure-pipelines.yml - src/* + - schemas/JSON/manifests/* pool: vmImage: 'windows-latest'