diff --git a/test/E2ETests/NtlmAuthentationTest.cs b/test/E2ETests/NtlmAuthentationTest.cs index 295578c4c9..1310449c9d 100644 --- a/test/E2ETests/NtlmAuthentationTest.cs +++ b/test/E2ETests/NtlmAuthentationTest.cs @@ -55,7 +55,7 @@ namespace E2ETests if (applicationType == ApplicationType.Standalone) { - deploymentParameters.AdditionalPublishParameters = "/p:RuntimeIdentifier=" + RuntimeEnvironment.GetRuntimeIdentifier(); + deploymentParameters.AdditionalPublishParameters = " -r " + RuntimeEnvironment.GetRuntimeIdentifier(); } // Override the connection strings using environment based configuration diff --git a/test/E2ETests/OpenIdConnectTests.cs b/test/E2ETests/OpenIdConnectTests.cs index 07de2a0f8e..57006bd829 100644 --- a/test/E2ETests/OpenIdConnectTests.cs +++ b/test/E2ETests/OpenIdConnectTests.cs @@ -80,7 +80,7 @@ namespace E2ETests if (applicationType == ApplicationType.Standalone) { - deploymentParameters.AdditionalPublishParameters = "/p:RuntimeIdentifier=" + RuntimeEnvironment.GetRuntimeIdentifier(); + deploymentParameters.AdditionalPublishParameters = " -r " + RuntimeEnvironment.GetRuntimeIdentifier(); } // Override the connection strings using environment based configuration diff --git a/test/E2ETests/PublishAndRunTests.cs b/test/E2ETests/PublishAndRunTests.cs index 1481f0ba9c..dd26ecddfc 100644 --- a/test/E2ETests/PublishAndRunTests.cs +++ b/test/E2ETests/PublishAndRunTests.cs @@ -161,7 +161,7 @@ namespace E2ETests if (applicationType == ApplicationType.Standalone) { - deploymentParameters.AdditionalPublishParameters = "--runtime " + RuntimeEnvironment.GetRuntimeIdentifier(); + deploymentParameters.AdditionalPublishParameters = "-r " + RuntimeEnvironment.GetRuntimeIdentifier(); } // Override the connection strings using environment based configuration diff --git a/test/E2ETests/SmokeTests.cs b/test/E2ETests/SmokeTests.cs index 2400385e61..bfc586cf2d 100644 --- a/test/E2ETests/SmokeTests.cs +++ b/test/E2ETests/SmokeTests.cs @@ -195,7 +195,7 @@ namespace E2ETests if (applicationType == ApplicationType.Standalone) { - deploymentParameters.AdditionalPublishParameters = "/p:RuntimeIdentifier=" + RuntimeEnvironment.GetRuntimeIdentifier(); + deploymentParameters.AdditionalPublishParameters = " -r " + RuntimeEnvironment.GetRuntimeIdentifier(); } // Override the connection strings using environment based configuration diff --git a/test/E2ETests/SmokeTestsOnNanoServer.cs b/test/E2ETests/SmokeTestsOnNanoServer.cs index 199f621ba9..0c19a1d661 100644 --- a/test/E2ETests/SmokeTestsOnNanoServer.cs +++ b/test/E2ETests/SmokeTestsOnNanoServer.cs @@ -13,6 +13,8 @@ using Xunit.Abstractions; namespace E2ETests { + // These tests publish(on the machine where these tests on run) the MusicStore app to a local folder first + // and then copy the published output to the target NanoServer and launch them. public class SmokeTestsOnNanoServerUsingStandaloneRuntime : IDisposable { private readonly SmokeTestsOnNanoServer _smokeTestsOnNanoServer; @@ -263,6 +265,15 @@ namespace E2ETests ApplicationBaseUriHint = applicationBaseUrl, ApplicationType = applicationType }; + + if (applicationType == ApplicationType.Standalone) + { + // Unable to use the RuntimeEnvironment.GetRuntimeIdentifier API here as NanoServer which is + // part of Windows Server 2016 has a RID of 'win10-x64' where as the CI servers currently + // run on Windows Server 2012 or less, which have different RIDs. + deploymentParameters.AdditionalPublishParameters = "-r win10-x64"; + } + deploymentParameters.EnvironmentVariables.Add( new KeyValuePair("ASPNETCORE_ENVIRONMENT", "SocialTesting"));