test passing on mac and windows

This commit is contained in:
Tom Gardham-Pallister 2017-01-17 10:20:49 +00:00
parent b873300e82
commit a8878b4a19
11 changed files with 40 additions and 6 deletions

0
build-and-run-tests.bat Normal file → Executable file
View File

0
build.bat Normal file → Executable file
View File

3
configuration.yaml Executable file
View File

@ -0,0 +1,3 @@
Routes:
- Downstream: http://localhost:51879/
Upstream: /heee

0
run-tests.bat Normal file → Executable file
View File

View File

@ -30,7 +30,8 @@
"CacheManager.Microsoft.Extensions.Logging": "0.9.2" "CacheManager.Microsoft.Extensions.Logging": "0.9.2"
}, },
"runtimes": { "runtimes": {
"win10-x64": {} "win10-x64": {},
"osx.10.11-x64":{}
}, },
"frameworks": { "frameworks": {
"netcoreapp1.4": { "netcoreapp1.4": {

View File

@ -1,8 +1,34 @@
namespace Ocelot.AcceptanceTests namespace Ocelot.AcceptanceTests
{ {
using System.Runtime.InteropServices;
public static class TestConfiguration public static class TestConfiguration
{ {
public static double Version => 1.4; public static double Version => 1.4;
public static string ConfigurationPath => $"./bin/Debug/netcoreapp{Version}/win10-x64/configuration.json"; //public static string Runtime => "win10-x64";
public static string ConfigurationPath => GetConfigurationPath();
public static string GetConfigurationPath()
{
var osArchitecture = RuntimeInformation.OSArchitecture.ToString();
var oSDescription = string.Empty;
if(RuntimeInformation.OSDescription.ToLower().Contains("darwin"))
{
oSDescription = "osx.10.11";
}
if(RuntimeInformation.OSDescription.ToLower().Contains("windows"))
{
oSDescription = "win10";
}
var runTime = $"{oSDescription}-{osArchitecture}".ToLower();
var configPath = $"./bin/Debug/netcoreapp{Version}/{runTime}/configuration.json";
return configPath;
}
} }
} }

0
test/Ocelot.AcceptanceTests/configuration.json Normal file → Executable file
View File

View File

@ -35,7 +35,8 @@
"TestStack.BDDfy": "4.3.2" "TestStack.BDDfy": "4.3.2"
}, },
"runtimes": { "runtimes": {
"win10-x64": {} "win10-x64": {},
"osx.10.11-x64":{}
}, },
"frameworks": { "frameworks": {
"netcoreapp1.4": { "netcoreapp1.4": {

View File

@ -9,7 +9,8 @@
"BenchmarkDotNet": "0.10.1" "BenchmarkDotNet": "0.10.1"
}, },
"runtimes": { "runtimes": {
"win10-x64": {} "win10-x64": {},
"osx.10.11-x64":{}
}, },
"frameworks": { "frameworks": {
"netcoreapp1.4": { "netcoreapp1.4": {

View File

@ -19,7 +19,8 @@
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final" "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
}, },
"runtimes": { "runtimes": {
"win10-x64": {} "win10-x64": {},
"osx.10.11-x64":{}
}, },
"frameworks": { "frameworks": {
"netcoreapp1.4": { "netcoreapp1.4": {

View File

@ -27,7 +27,8 @@
"Microsoft.DotNet.InternalAbstractions": "1.0.0" "Microsoft.DotNet.InternalAbstractions": "1.0.0"
}, },
"runtimes": { "runtimes": {
"win10-x64": {} "win10-x64": {},
"osx.10.11-x64":{}
}, },
"frameworks": { "frameworks": {
"netcoreapp1.4": { "netcoreapp1.4": {