public async Task RunTestsAsync( ServerType serverType, string applicationBaseUrl, ApplicationType applicationType) { using (_logger.BeginScope(nameof(SmokeTestsOnNanoServerUsingStandaloneRuntime))) { var deploymentParameters = new RemoteWindowsDeploymentParameters( Helpers.GetApplicationPath(applicationType), _remoteDeploymentConfig.DotnetRuntimePathOnShare, serverType, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, _remoteDeploymentConfig.FileSharePath, _remoteDeploymentConfig.ServerName, _remoteDeploymentConfig.AccountName, _remoteDeploymentConfig.AccountPassword) { TargetFramework = "netcoreapp1.0", ApplicationBaseUriHint = applicationBaseUrl, ApplicationType = applicationType }; deploymentParameters.EnvironmentVariables.Add( new KeyValuePair <string, string>("ASPNETCORE_ENVIRONMENT", "SocialTesting")); using (var deployer = new RemoteWindowsDeployer(deploymentParameters, _logger)) { var deploymentResult = deployer.Deploy(); await SmokeTestHelper.RunTestsAsync(deploymentResult, _logger); } } }
public async Task RunTestsAsync( ServerType serverType, string applicationBaseUrl, ApplicationType applicationType) { using (_logger.BeginScope(nameof(SmokeTestsOnNanoServerUsingStandaloneRuntime))) { var deploymentParameters = new RemoteWindowsDeploymentParameters( Helpers.GetApplicationPath(applicationType), _remoteDeploymentConfig.DotnetRuntimePathOnShare, serverType, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, _remoteDeploymentConfig.FileSharePath, _remoteDeploymentConfig.ServerName, _remoteDeploymentConfig.AccountName, _remoteDeploymentConfig.AccountPassword) { TargetFramework = "netcoreapp1.1", 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 <string, string>("ASPNETCORE_ENVIRONMENT", "SocialTesting")); using (var deployer = new RemoteWindowsDeployer(deploymentParameters, _logger)) { var deploymentResult = deployer.Deploy(); await SmokeTestHelper.RunTestsAsync(deploymentResult, _logger); } } }