refactoring to consolidate configuration code

This commit is contained in:
Tom Pallister
2018-04-13 22:47:50 +01:00
parent f88e1f65ef
commit fe5662f954
32 changed files with 552 additions and 676 deletions

View File

@ -303,7 +303,7 @@ namespace Ocelot.AcceptanceTests
{
app.Run(async context =>
{
if (context.Request.Method.ToLower() == "get" && context.Request.Path.Value == "/v1/kv/OcelotConfiguration")
if (context.Request.Method.ToLower() == "get" && context.Request.Path.Value == "/v1/kv/InternalConfiguration")
{
var json = JsonConvert.SerializeObject(_config);
@ -315,7 +315,7 @@ namespace Ocelot.AcceptanceTests
await context.Response.WriteJsonAsync(new FakeConsulGetResponse[] { kvp });
}
else if (context.Request.Method.ToLower() == "put" && context.Request.Path.Value == "/v1/kv/OcelotConfiguration")
else if (context.Request.Method.ToLower() == "put" && context.Request.Path.Value == "/v1/kv/InternalConfiguration")
{
try
{
@ -352,7 +352,7 @@ namespace Ocelot.AcceptanceTests
public int CreateIndex => 100;
public int ModifyIndex => 200;
public int LockIndex => 200;
public string Key => "OcelotConfiguration";
public string Key => "InternalConfiguration";
public int Flags => 0;
public string Value { get; private set; }
public string Session => "adf4238a-882b-9ddc-4a9d-5b6758e4159e";