mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-04-22 06:22:50 +08:00
removed test configuration nonsense
This commit is contained in:
parent
b0333a0e82
commit
eb5dfc6975
@ -1,36 +1,10 @@
|
|||||||
namespace Ocelot.AcceptanceTests
|
using System;
|
||||||
{
|
using System.IO;
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
|
namespace Ocelot.AcceptanceTests
|
||||||
|
{
|
||||||
public static class TestConfiguration
|
public static class TestConfiguration
|
||||||
{
|
{
|
||||||
public static double Version => 1.1;
|
public static string ConfigurationPath => Path.Combine(AppContext.BaseDirectory, "configuration.json");
|
||||||
public static string ConfigurationPath => GetConfigurationPath();
|
|
||||||
|
|
||||||
public static string GetConfigurationPath()
|
|
||||||
{
|
|
||||||
var osArchitecture = RuntimeInformation.OSArchitecture.ToString();
|
|
||||||
|
|
||||||
if(RuntimeInformation.OSDescription.ToLower().Contains("darwin"))
|
|
||||||
{
|
|
||||||
return FormatConfigurationPath("osx.10.11", osArchitecture);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(RuntimeInformation.OSDescription.ToLower().Contains("microsoft windows 10"))
|
|
||||||
{
|
|
||||||
return FormatConfigurationPath("win10", osArchitecture);
|
|
||||||
}
|
|
||||||
|
|
||||||
return FormatConfigurationPath("win7", osArchitecture);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string FormatConfigurationPath(string oSDescription, string osArchitecture)
|
|
||||||
{
|
|
||||||
var runTime = $"{oSDescription}-{osArchitecture}".ToLower();
|
|
||||||
|
|
||||||
var configPath = $"./bin/Debug/netcoreapp{Version}/{runTime}/configuration.json";
|
|
||||||
|
|
||||||
return configPath;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user