From bdc76ddfd69c1c48923fb3211e6092ca57da0cec Mon Sep 17 00:00:00 2001 From: John Luo Date: Thu, 18 Feb 2016 16:01:01 -0800 Subject: [PATCH] Updating test TFMs for custom test discovery --- .../HelloWorldTest.cs | 6 ++--- .../Helpers.cs | 2 +- .../HttpsTest.cs | 6 ++--- .../NtlmAuthentationTest.cs | 2 +- .../project.json | 22 +++++++++++++------ .../project.json | 11 +++++++--- test/TestSites/Program.cs | 1 + test/TestSites/hosting.json | 3 --- test/TestSites/project.json | 5 ++--- test/dotnet-publish-iis.Tests/project.json | 2 +- 10 files changed, 35 insertions(+), 25 deletions(-) delete mode 100644 test/TestSites/hosting.json diff --git a/test/Microsoft.AspNetCore.IISPlatformHandler.FunctionalTests/HelloWorldTest.cs b/test/Microsoft.AspNetCore.IISPlatformHandler.FunctionalTests/HelloWorldTest.cs index 3570a6bb8f..46b1dc35f3 100644 --- a/test/Microsoft.AspNetCore.IISPlatformHandler.FunctionalTests/HelloWorldTest.cs +++ b/test/Microsoft.AspNetCore.IISPlatformHandler.FunctionalTests/HelloWorldTest.cs @@ -19,9 +19,9 @@ namespace Microsoft.AspNetCore.IISPlatformHandler.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5061/", ServerType.Kestrel)] + //[InlineData(RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5061/", ServerType.Kestrel)] [InlineData(RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5062/", ServerType.Kestrel)] - [InlineData(RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5063/", ServerType.Kestrel)] + //[InlineData(RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5063/", ServerType.Kestrel)] [InlineData(RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "http://localhost:5064/", ServerType.Kestrel)] public Task HelloWorld_IISExpress(RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ServerType delegateServer) { @@ -34,7 +34,7 @@ namespace Microsoft.AspNetCore.IISPlatformHandler.FunctionalTests [OSSkipCondition(OperatingSystems.MacOSX)] [SkipIfCurrentRuntimeIsCoreClr] [InlineData(RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5069/", ServerType.Kestrel)] - [InlineData(RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5070/", ServerType.Kestrel)] + //[InlineData(RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5070/", ServerType.Kestrel)] public Task HelloWorld_IIS(RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ServerType delegateServer) { return HelloWorld(ServerType.IIS, runtimeFlavor, architecture, applicationBaseUrl, delegateServer); diff --git a/test/Microsoft.AspNetCore.IISPlatformHandler.FunctionalTests/Helpers.cs b/test/Microsoft.AspNetCore.IISPlatformHandler.FunctionalTests/Helpers.cs index eae3d1ea06..3b88debfcd 100644 --- a/test/Microsoft.AspNetCore.IISPlatformHandler.FunctionalTests/Helpers.cs +++ b/test/Microsoft.AspNetCore.IISPlatformHandler.FunctionalTests/Helpers.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.IISPlatformHandler.FunctionalTests { public static string GetTestSitesPath() { - return Path.GetFullPath(Path.Combine("..", "TestSites")); + return Path.GetFullPath(Path.Combine("..", "..", "..", "TestSites")); } } } \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.IISPlatformHandler.FunctionalTests/HttpsTest.cs b/test/Microsoft.AspNetCore.IISPlatformHandler.FunctionalTests/HttpsTest.cs index 540a8c6875..0d13849596 100644 --- a/test/Microsoft.AspNetCore.IISPlatformHandler.FunctionalTests/HttpsTest.cs +++ b/test/Microsoft.AspNetCore.IISPlatformHandler.FunctionalTests/HttpsTest.cs @@ -20,7 +20,7 @@ namespace Microsoft.AspNetCore.IISPlatformHandler.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "https://localhost:44399/")] + //[InlineData(RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "https://localhost:44399/")] [InlineData(RuntimeFlavor.Clr, RuntimeArchitecture.x64, "https://localhost:44398/")] public Task Https_HelloWorld(RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { @@ -79,7 +79,7 @@ namespace Microsoft.AspNetCore.IISPlatformHandler.FunctionalTests [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] [InlineData(RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, "https://localhost:44397/")] - [InlineData(RuntimeFlavor.Clr, RuntimeArchitecture.x86, "https://localhost:44396/")] + //[InlineData(RuntimeFlavor.Clr, RuntimeArchitecture.x86, "https://localhost:44396/")] public Task Https_HelloWorld_NoClientCert(RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { return HttpsHelloWorldCerts(ServerType.IISExpress, runtimeFlavor, architecture, applicationBaseUrl, sendClientCert: false); @@ -88,7 +88,7 @@ namespace Microsoft.AspNetCore.IISPlatformHandler.FunctionalTests [ConditionalTheory(Skip = "Manual test only, selecting a client cert is non-determanistic on different machines.")] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "https://localhost:44395/")] + //[InlineData(RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "https://localhost:44395/")] [InlineData(RuntimeFlavor.Clr, RuntimeArchitecture.x64, "https://localhost:44394/")] public Task Https_HelloWorld_ClientCert(RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { diff --git a/test/Microsoft.AspNetCore.IISPlatformHandler.FunctionalTests/NtlmAuthentationTest.cs b/test/Microsoft.AspNetCore.IISPlatformHandler.FunctionalTests/NtlmAuthentationTest.cs index c65cfe4d6d..a05b5330d8 100644 --- a/test/Microsoft.AspNetCore.IISPlatformHandler.FunctionalTests/NtlmAuthentationTest.cs +++ b/test/Microsoft.AspNetCore.IISPlatformHandler.FunctionalTests/NtlmAuthentationTest.cs @@ -20,7 +20,7 @@ namespace Microsoft.AspNetCore.IISPlatformHandler.FunctionalTests [ConditionalTheory] [OSSkipCondition(OperatingSystems.Linux)] [OSSkipCondition(OperatingSystems.MacOSX)] - [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5050/")] + //[InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5050/")] [InlineData(ServerType.IISExpress, RuntimeFlavor.Clr, RuntimeArchitecture.x64, "http://localhost:5051/")] public async Task NtlmAuthentication(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl) { diff --git a/test/Microsoft.AspNetCore.IISPlatformHandler.FunctionalTests/project.json b/test/Microsoft.AspNetCore.IISPlatformHandler.FunctionalTests/project.json index 3ea9425111..9053a9029a 100644 --- a/test/Microsoft.AspNetCore.IISPlatformHandler.FunctionalTests/project.json +++ b/test/Microsoft.AspNetCore.IISPlatformHandler.FunctionalTests/project.json @@ -1,24 +1,32 @@ { + "content": [ + "Http.config", + "Https.config", + "NtlmAuthentation.config", + ], "compilationOptions": { "warningsAsErrors": true }, - "commands": { - "test": "xunit.runner.aspnet" - }, "dependencies": { "Microsoft.AspNetCore.Server.Testing": "1.0.0-*", + "Microsoft.Extensions.Logging": "1.0.0-*", "Microsoft.Extensions.Logging.Console": "1.0.0-*", "Microsoft.NETCore.Platforms": "1.0.1-*", - "xunit.runner.aspnet": "2.0.0-aspnet-*" + "xunit": "2.1.0" }, "frameworks": { - "dnx451": { + "net451": { + "dependencies": { + "xunit.runner.console": "2.1.0" + }, "frameworkAssemblies": { "System.Data": "", "System.Net.Http": "", "System.Net.Http.WebRequest": "", + "System.Runtime": "", "System.Xml": "" } } - } -} \ No newline at end of file + }, + "testRunner": "xunit" +} diff --git a/test/Microsoft.AspNetCore.IISPlatformHandler.Tests/project.json b/test/Microsoft.AspNetCore.IISPlatformHandler.Tests/project.json index 2db67ec675..59b8bbc423 100644 --- a/test/Microsoft.AspNetCore.IISPlatformHandler.Tests/project.json +++ b/test/Microsoft.AspNetCore.IISPlatformHandler.Tests/project.json @@ -4,7 +4,7 @@ "Microsoft.AspNetCore.IISPlatformHandler": "1.0.0-*", "Microsoft.AspNetCore.TestHost": "1.0.0-*", "Microsoft.NETCore.Platforms": "1.0.1-*", - "xunit.runner.aspnet": "2.0.0-aspnet-*" + "xunit": "2.1.0" }, "frameworks": { "dnxcore50": { @@ -13,6 +13,11 @@ "dotnet-test-xunit": "1.0.0-dev-*" } }, - "dnx451": {} - } + "net451": { + "dependencies": { + "xunit.runner.console": "2.1.0" + } + } + }, + "testRunner": "xunit" } \ No newline at end of file diff --git a/test/TestSites/Program.cs b/test/TestSites/Program.cs index e468a20a85..16d0c26e7a 100644 --- a/test/TestSites/Program.cs +++ b/test/TestSites/Program.cs @@ -13,6 +13,7 @@ namespace TestSites .UseDefaultConfiguration(args) .UseIISPlatformHandlerUrl() .UseStartup("TestSites") + .UseServer("Microsoft.AspNetCore.Server.Kestrel") .Build(); host.Run(); diff --git a/test/TestSites/hosting.json b/test/TestSites/hosting.json deleted file mode 100644 index 6a93dbafa8..0000000000 --- a/test/TestSites/hosting.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "server": "Microsoft.AspNetCore.Server.Kestrel" -} diff --git a/test/TestSites/project.json b/test/TestSites/project.json index b500d22648..c3b35340a7 100644 --- a/test/TestSites/project.json +++ b/test/TestSites/project.json @@ -4,8 +4,7 @@ "emitEntryPoint": true }, "content": [ - "wwwroot/**/*", - "hosting.json" + "wwwroot/**/*" ], "dependencies": { "Microsoft.AspNetCore.IISPlatformHandler": "1.0.0-*", @@ -27,4 +26,4 @@ }, "dnx451": {} } -} \ No newline at end of file +} diff --git a/test/dotnet-publish-iis.Tests/project.json b/test/dotnet-publish-iis.Tests/project.json index b67d4b5e8e..1e7b167a1d 100644 --- a/test/dotnet-publish-iis.Tests/project.json +++ b/test/dotnet-publish-iis.Tests/project.json @@ -12,4 +12,4 @@ } } } -} \ No newline at end of file +}