From 450ee8927c83006c41740c1c6c843f4f455c06e4 Mon Sep 17 00:00:00 2001 From: John Luo Date: Thu, 2 Feb 2017 18:33:48 -0800 Subject: [PATCH] Workaround dotnet test pathing issues --- .../Autobahn/AutobahnTester.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/Microsoft.AspNetCore.WebSockets.ConformanceTest/Autobahn/AutobahnTester.cs b/test/Microsoft.AspNetCore.WebSockets.ConformanceTest/Autobahn/AutobahnTester.cs index 045e86428c..0f84b5a7a1 100644 --- a/test/Microsoft.AspNetCore.WebSockets.ConformanceTest/Autobahn/AutobahnTester.cs +++ b/test/Microsoft.AspNetCore.WebSockets.ConformanceTest/Autobahn/AutobahnTester.cs @@ -60,7 +60,7 @@ namespace Microsoft.AspNetCore.WebSockets.ConformanceTest.Autobahn cancellationToken.ThrowIfCancellationRequested(); // Parse the output. - var outputFile = Path.Combine(Directory.GetCurrentDirectory(), Spec.OutputDirectory, "index.json"); + var outputFile = Path.Combine(Directory.GetCurrentDirectory(), "..", "..", "..", Spec.OutputDirectory, "index.json"); using (var reader = new StreamReader(File.OpenRead(outputFile))) { return AutobahnResult.FromReportJson(JObject.Parse(await reader.ReadToEndAsync())); @@ -95,6 +95,7 @@ namespace Microsoft.AspNetCore.WebSockets.ConformanceTest.Autobahn var logger = _loggerFactory.CreateLogger($"AutobahnTestApp:{server}:{sslNamePart}:{environment}"); var appPath = Helpers.GetApplicationPath("AutobahnTestApp"); + var configPath = Path.Combine(Directory.GetCurrentDirectory(), "..", "..", "..", "Http.config"); var parameters = new DeploymentParameters(appPath, server, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64) { ApplicationBaseUriHint = baseUrl, @@ -102,7 +103,7 @@ namespace Microsoft.AspNetCore.WebSockets.ConformanceTest.Autobahn TargetFramework = "netcoreapp1.1", EnvironmentName = environment, SiteName = "HttpTestSite", // This is configured in the Http.config - ServerConfigTemplateContent = (server == ServerType.IISExpress) ? File.ReadAllText("Http.config") : null, + ServerConfigTemplateContent = (server == ServerType.IISExpress) ? File.ReadAllText(configPath) : null, }; var deployer = ApplicationDeployerFactory.Create(parameters, logger);