diff --git a/src/MusicStore/Models/SampleData.cs b/src/MusicStore/Models/SampleData.cs index ee1eb7f632..ff7f2336bd 100644 --- a/src/MusicStore/Models/SampleData.cs +++ b/src/MusicStore/Models/SampleData.cs @@ -112,6 +112,7 @@ namespace MusicStore.Models await userManager.AddClaimAsync(user, new Claim("ManageStore", "Allowed")); } +#if TESTING var envPerfLab = configuration.Get("PERF_LAB"); if (envPerfLab == "true") { @@ -125,6 +126,7 @@ namespace MusicStore.Models } } } +#endif } private static Album[] GetAlbums(string imgUrl, Dictionary genres, Dictionary artists) diff --git a/test/DeploymentHelpers/Common/DotnetFlavor.cs b/test/DeploymentHelpers/Common/DotnetFlavor.cs index 32447a57b6..de8eb32205 100644 --- a/test/DeploymentHelpers/Common/DotnetFlavor.cs +++ b/test/DeploymentHelpers/Common/DotnetFlavor.cs @@ -2,8 +2,8 @@ { public enum RuntimeFlavor { - clr, - coreclr, - mono + Clr, + CoreClr, + Mono } } diff --git a/test/DeploymentHelpers/Deployers/ApplicationDeployer.cs b/test/DeploymentHelpers/Deployers/ApplicationDeployer.cs index 032c0e2110..d968520609 100644 --- a/test/DeploymentHelpers/Deployers/ApplicationDeployer.cs +++ b/test/DeploymentHelpers/Deployers/ApplicationDeployer.cs @@ -41,7 +41,7 @@ namespace DeploymentHelpers var replaceStr = new StringBuilder(). Append("dnx"). - Append((DeploymentParameters.RuntimeFlavor == RuntimeFlavor.coreclr) ? "-coreclr" : "-clr"). + Append((DeploymentParameters.RuntimeFlavor == RuntimeFlavor.CoreClr) ? "-coreclr" : "-clr"). Append("-win"). Append((DeploymentParameters.RuntimeArchitecture == RuntimeArchitecture.x86) ? "-x86" : "-x64"). ToString(); diff --git a/test/DeploymentHelpers/Deployers/ApplicationDeployerFactory.cs b/test/DeploymentHelpers/Deployers/ApplicationDeployerFactory.cs index a6d9304382..7be186661b 100644 --- a/test/DeploymentHelpers/Deployers/ApplicationDeployerFactory.cs +++ b/test/DeploymentHelpers/Deployers/ApplicationDeployerFactory.cs @@ -26,7 +26,7 @@ namespace DeploymentHelpers throw new ArgumentNullException(nameof(logger)); } - if (deploymentParameters.RuntimeFlavor == RuntimeFlavor.mono) + if (deploymentParameters.RuntimeFlavor == RuntimeFlavor.Mono) { return new MonoDeployer(deploymentParameters, logger); } diff --git a/test/E2ETests/Implementation/Validator.cs b/test/E2ETests/Implementation/Validator.cs index 778426a8ac..0584073a2f 100644 --- a/test/E2ETests/Implementation/Validator.cs +++ b/test/E2ETests/Implementation/Validator.cs @@ -62,7 +62,7 @@ namespace E2ETests //var runtimeResponse = await _httpClient.GetAsync("runtimeinfo"); // https://github.com/aspnet/Diagnostics/issues/108 - if (_deploymentResult.DeploymentParameters.RuntimeFlavor != RuntimeFlavor.coreclr) + if (_deploymentResult.DeploymentParameters.RuntimeFlavor != RuntimeFlavor.CoreClr) { //Helpers.ThrowIfResponseStatusNotOk(runtimeResponse, _logger); } diff --git a/test/E2ETests/NtlmAuthentationTest.cs b/test/E2ETests/NtlmAuthentationTest.cs index 475fe643c5..3f6ceed3a6 100644 --- a/test/E2ETests/NtlmAuthentationTest.cs +++ b/test/E2ETests/NtlmAuthentationTest.cs @@ -15,9 +15,9 @@ namespace E2ETests { [ConditionalTheory, Trait("E2Etests", "E2Etests")] [OSSkipCondition(OperatingSystems.Unix | OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.coreclr, RuntimeArchitecture.x86, "http://localhost:5050/")] - [InlineData(ServerType.IISExpress, RuntimeFlavor.clr, RuntimeArchitecture.x64, "http://localhost:5051/")] - [InlineData(ServerType.WebListener, RuntimeFlavor.coreclr, RuntimeArchitecture.x64, "http://localhost:5052/")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5050/")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5051/")] + [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5052/")] public async Task NtlmAuthenticationTest(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { var logger = new LoggerFactory() diff --git a/test/E2ETests/OpenIdConnectTests.cs b/test/E2ETests/OpenIdConnectTests.cs index 4281876116..eef5b46f8e 100644 --- a/test/E2ETests/OpenIdConnectTests.cs +++ b/test/E2ETests/OpenIdConnectTests.cs @@ -14,16 +14,16 @@ namespace E2ETests { [ConditionalTheory, Trait("E2Etests", "E2Etests")] [FrameworkSkipCondition(RuntimeFrameworks.Mono)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.clr, RuntimeArchitecture.x86, "http://localhost:5040/")] - [InlineData(ServerType.IISExpress, RuntimeFlavor.coreclr, RuntimeArchitecture.x64, "http://localhost:5041/")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5040/")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5041/")] public async Task OpenIdConnect_OnX86(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { await OpenIdConnectTestSuite(serverType, runtimeFlavor, architecture, applicationBaseUrl); } [ConditionalTheory, Trait("E2Etests", "E2Etests")] - [FrameworkSkipCondition(RuntimeFrameworks.DotNet)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.mono, RuntimeArchitecture.x86, "http://localhost:5042/")] + [FrameworkSkipCondition(RuntimeFrameworks.CLR)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.Mono, RuntimeArchitecture.x86, "http://localhost:5042/")] public async Task OpenIdConnect_OnMono(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { await OpenIdConnectTestSuite(serverType, runtimeFlavor, architecture, applicationBaseUrl); diff --git a/test/E2ETests/PublishAndRunTests.cs b/test/E2ETests/PublishAndRunTests.cs index d3b27b69f3..fbdfc14482 100644 --- a/test/E2ETests/PublishAndRunTests.cs +++ b/test/E2ETests/PublishAndRunTests.cs @@ -15,7 +15,7 @@ namespace E2ETests { [ConditionalTheory, Trait("E2Etests", "E2Etests")] [FrameworkSkipCondition(RuntimeFrameworks.Mono)] - [InlineData(ServerType.WebListener, RuntimeFlavor.clr, RuntimeArchitecture.x64, "http://localhost:5025/", false)] + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5025/", false)] //https://github.com/aspnet/KRuntime/issues/642 //[InlineData(ServerType.Helios, RuntimeFlavor.CoreClr, RuntimeArchitecture.amd64, "http://localhost:5026/")] public async Task Publish_And_Run_Tests_On_AMD64(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, bool noSource) @@ -29,8 +29,8 @@ namespace E2ETests { [ConditionalTheory, Trait("E2Etests", "E2Etests")] [FrameworkSkipCondition(RuntimeFrameworks.Mono)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.clr, RuntimeArchitecture.x86, "http://localhost:5027/", false)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.clr, RuntimeArchitecture.x86, "http://localhost:5028/", true)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5027/", false)] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5028/", true)] public async Task Publish_And_Run_Tests_On_X86(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, bool noSource) { var testRunner = new PublishAndRunTests(); @@ -38,9 +38,9 @@ namespace E2ETests } [ConditionalTheory, Trait("E2Etests", "E2Etests")] - [FrameworkSkipCondition(RuntimeFrameworks.DotNet)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.mono, RuntimeArchitecture.x86, "http://localhost:5029/", false)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.mono, RuntimeArchitecture.x86, "http://localhost:5030/", true)] + [FrameworkSkipCondition(RuntimeFrameworks.CLR)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.Mono, RuntimeArchitecture.x86, "http://localhost:5029/", false)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.Mono, RuntimeArchitecture.x86, "http://localhost:5030/", true)] public async Task Publish_And_Run_Tests_On_Mono(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, bool noSource) { var testRunner = new PublishAndRunTests(); diff --git a/test/E2ETests/SmokeTests.cs b/test/E2ETests/SmokeTests.cs index 01ac33d781..332b911aba 100644 --- a/test/E2ETests/SmokeTests.cs +++ b/test/E2ETests/SmokeTests.cs @@ -14,9 +14,9 @@ namespace E2ETests { [ConditionalTheory, Trait("E2Etests", "E2Etests")] [FrameworkSkipCondition(RuntimeFrameworks.Mono)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.clr, RuntimeArchitecture.x86, "http://localhost:5001/")] - [InlineData(ServerType.WebListener, RuntimeFlavor.clr, RuntimeArchitecture.x86, "http://localhost:5002/")] - [InlineData(ServerType.Kestrel, RuntimeFlavor.clr, RuntimeArchitecture.x86, "http://localhost:5003/")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5001/")] + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5002/")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5003/")] public async Task SmokeTestSuite_OnX86_clr(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { var smokeTestRunner = new SmokeTests(); @@ -28,9 +28,9 @@ namespace E2ETests { [ConditionalTheory, Trait("E2Etests", "E2Etests")] [FrameworkSkipCondition(RuntimeFrameworks.Mono)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.coreclr, RuntimeArchitecture.x86, "http://localhost:5004/")] - [InlineData(ServerType.WebListener, RuntimeFlavor.coreclr, RuntimeArchitecture.x86, "http://localhost:5005/")] - [InlineData(ServerType.Kestrel, RuntimeFlavor.coreclr, RuntimeArchitecture.x86, "http://localhost:5006/")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5004/")] + [InlineData(ServerType.WebListener, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5005/")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5006/")] public async Task SmokeTestSuite_OnX86_coreclr(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { var smokeTestRunner = new SmokeTests(); @@ -43,9 +43,9 @@ namespace E2ETests [ConditionalTheory, Trait("E2Etests", "E2Etests")] [FrameworkSkipCondition(RuntimeFrameworks.Mono)] [SkipOn32BitOS] - [InlineData(ServerType.WebListener, RuntimeFlavor.clr, RuntimeArchitecture.x64, "http://localhost:5007/")] - [InlineData(ServerType.IISExpress, RuntimeFlavor.coreclr, RuntimeArchitecture.x64, "http://localhost:5008/")] - [InlineData(ServerType.Kestrel, RuntimeFlavor.coreclr, RuntimeArchitecture.x64, "http://localhost:5009/")] + [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5007/")] + [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5008/")] + [InlineData(ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5009/")] public async Task SmokeTestSuite_OnAMD64(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { var smokeTestRunner = new SmokeTests(); @@ -56,8 +56,8 @@ namespace E2ETests public class SmokeTests_OnMono { [ConditionalTheory, Trait("E2Etests", "E2Etests")] - [FrameworkSkipCondition(RuntimeFrameworks.DotNet)] - [InlineData(ServerType.Kestrel, RuntimeFlavor.mono, RuntimeArchitecture.x86, "http://localhost:5010/")] + [FrameworkSkipCondition(RuntimeFrameworks.CLR)] + [InlineData(ServerType.Kestrel, RuntimeFlavor.Mono, RuntimeArchitecture.x86, "http://localhost:5010/")] public async Task SmokeTestSuite_OnMono(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { var smokeTestRunner = new SmokeTests(); @@ -72,7 +72,7 @@ namespace E2ETests [FrameworkSkipCondition(RuntimeFrameworks.Mono)] [OSSkipCondition(OperatingSystems.Win7And2008R2 | OperatingSystems.MacOSX | OperatingSystems.Unix)] [SkipIfCurrentRuntimeIsCoreClr] - [InlineData(ServerType.IISNativeModule, RuntimeFlavor.coreclr, RuntimeArchitecture.x86, "http://localhost:5011/")] + [InlineData(ServerType.IISNativeModule, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5011/")] public async Task SmokeTestSuite_On_NativeModule_X86(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { var smokeTestRunner = new SmokeTests(); @@ -85,7 +85,7 @@ namespace E2ETests [OSSkipCondition(OperatingSystems.Win7And2008R2 | OperatingSystems.MacOSX | OperatingSystems.Unix)] [SkipOn32BitOS] [SkipIfCurrentRuntimeIsCoreClr] - [InlineData(ServerType.IISNativeModule, RuntimeFlavor.coreclr, RuntimeArchitecture.x64, "http://localhost:5012/")] + [InlineData(ServerType.IISNativeModule, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5012/")] public async Task SmokeTestSuite_On_NativeModule_AMD64(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { var smokeTestRunner = new SmokeTests(); @@ -100,8 +100,8 @@ namespace E2ETests [OSSkipCondition(OperatingSystems.MacOSX | OperatingSystems.Unix)] [SkipIfCurrentRuntimeIsCoreClr] [SkipIfIISVariationsNotEnabled] - [InlineData(ServerType.IIS, RuntimeFlavor.clr, RuntimeArchitecture.x86, "http://localhost:5013/")] - [InlineData(ServerType.IIS, RuntimeFlavor.coreclr, RuntimeArchitecture.x64, "http://localhost:5013/")] + [InlineData(ServerType.IIS, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5013/")] + [InlineData(ServerType.IIS, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5013/")] public async Task SmokeTestSuite_On_IIS_X86(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { var smokeTestRunner = new SmokeTests();