mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-04-22 14:02:49 +08:00
updated acceptance and integration tests to use unique ports (#1091)
* updated acceptance and integration tests to use unique ports * fix broken travis builds * fix change port
This commit is contained in:
parent
41519b1e56
commit
fab09ab4dc
@ -1,4 +1,4 @@
|
||||
#tool "nuget:?package=GitVersion.CommandLine"
|
||||
#tool "nuget:?package=GitVersion.CommandLine&version=5.0.1"
|
||||
#tool "nuget:?package=GitReleaseNotes"
|
||||
#addin nuget:?package=Cake.Json
|
||||
#addin nuget:?package=Newtonsoft.Json
|
||||
|
@ -170,7 +170,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51890,
|
||||
Port = 54030,
|
||||
}
|
||||
},
|
||||
UpstreamPathTemplate = "/UserDetails",
|
||||
@ -222,7 +222,7 @@ namespace Ocelot.AcceptanceTests
|
||||
var expected = "{\"Comments\":" + commentsResponseContent + ",\"UserDetails\":" + userDetailsResponseContent + ",\"PostDetails\":" + postDetailsResponseContent + "}";
|
||||
|
||||
this.Given(x => x.GivenServiceOneIsRunning("http://localhost:51889", "/", 200, commentsResponseContent))
|
||||
.Given(x => x.GivenServiceTwoIsRunning("http://localhost:51890", "/users/1", 200, userDetailsResponseContent))
|
||||
.Given(x => x.GivenServiceTwoIsRunning("http://localhost:54030", "/users/1", 200, userDetailsResponseContent))
|
||||
.Given(x => x.GivenServiceTwoIsRunning("http://localhost:51887", "/posts/2", 200, postDetailsResponseContent))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunning())
|
||||
@ -401,7 +401,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51882,
|
||||
Port = 51889,
|
||||
}
|
||||
},
|
||||
UpstreamPathTemplate = "/tom",
|
||||
@ -427,7 +427,7 @@ namespace Ocelot.AcceptanceTests
|
||||
var expected = "{\"Laura\":,\"Tom\":{Hello from Tom}}";
|
||||
|
||||
this.Given(x => x.GivenServiceOneIsRunning("http://localhost:51881", "/", 404, ""))
|
||||
.Given(x => x.GivenServiceTwoIsRunning("http://localhost:51882", "/", 200, "{Hello from Tom}"))
|
||||
.Given(x => x.GivenServiceTwoIsRunning("http://localhost:51889", "/", 200, "{Hello from Tom}"))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunning())
|
||||
.When(x => _steps.WhenIGetUrlOnTheApiGateway("/"))
|
||||
|
@ -35,7 +35,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51899,
|
||||
Port = 57899,
|
||||
}
|
||||
},
|
||||
DownstreamScheme = "http",
|
||||
@ -49,13 +49,13 @@ namespace Ocelot.AcceptanceTests
|
||||
}
|
||||
};
|
||||
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51899", 200, "Hello from Laura", null, null))
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:57899", 200, "Hello from Laura", null, null))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunning())
|
||||
.When(x => _steps.WhenIGetUrlOnTheApiGateway("/"))
|
||||
.Then(x => _steps.ThenTheStatusCodeShouldBe(HttpStatusCode.OK))
|
||||
.And(x => _steps.ThenTheResponseBodyShouldBe("Hello from Laura"))
|
||||
.Given(x => x.GivenTheServiceNowReturns("http://localhost:51899", 200, "Hello from Tom"))
|
||||
.Given(x => x.GivenTheServiceNowReturns("http://localhost:57899", 200, "Hello from Tom"))
|
||||
.When(x => _steps.WhenIGetUrlOnTheApiGateway("/"))
|
||||
.Then(x => _steps.ThenTheStatusCodeShouldBe(HttpStatusCode.OK))
|
||||
.And(x => _steps.ThenTheResponseBodyShouldBe("Hello from Laura"))
|
||||
@ -122,7 +122,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51899,
|
||||
Port = 57879,
|
||||
}
|
||||
},
|
||||
DownstreamScheme = "http",
|
||||
@ -136,13 +136,13 @@ namespace Ocelot.AcceptanceTests
|
||||
}
|
||||
};
|
||||
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51899", 200, "Hello from Laura", null, null))
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:57879", 200, "Hello from Laura", null, null))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunningUsingJsonSerializedCache())
|
||||
.When(x => _steps.WhenIGetUrlOnTheApiGateway("/"))
|
||||
.Then(x => _steps.ThenTheStatusCodeShouldBe(HttpStatusCode.OK))
|
||||
.And(x => _steps.ThenTheResponseBodyShouldBe("Hello from Laura"))
|
||||
.Given(x => x.GivenTheServiceNowReturns("http://localhost:51899", 200, "Hello from Tom"))
|
||||
.Given(x => x.GivenTheServiceNowReturns("http://localhost:57879", 200, "Hello from Tom"))
|
||||
.When(x => _steps.WhenIGetUrlOnTheApiGateway("/"))
|
||||
.Then(x => _steps.ThenTheStatusCodeShouldBe(HttpStatusCode.OK))
|
||||
.And(x => _steps.ThenTheResponseBodyShouldBe("Hello from Laura"))
|
||||
@ -164,7 +164,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51899,
|
||||
Port = 57873,
|
||||
}
|
||||
},
|
||||
DownstreamScheme = "http",
|
||||
@ -178,13 +178,13 @@ namespace Ocelot.AcceptanceTests
|
||||
}
|
||||
};
|
||||
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51899", 200, "Hello from Laura", null, null))
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:57873", 200, "Hello from Laura", null, null))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunning())
|
||||
.When(x => _steps.WhenIGetUrlOnTheApiGateway("/"))
|
||||
.Then(x => _steps.ThenTheStatusCodeShouldBe(HttpStatusCode.OK))
|
||||
.And(x => _steps.ThenTheResponseBodyShouldBe("Hello from Laura"))
|
||||
.Given(x => x.GivenTheServiceNowReturns("http://localhost:51899", 200, "Hello from Tom"))
|
||||
.Given(x => x.GivenTheServiceNowReturns("http://localhost:57873", 200, "Hello from Tom"))
|
||||
.And(x => x.GivenTheCacheExpires())
|
||||
.When(x => _steps.WhenIGetUrlOnTheApiGateway("/"))
|
||||
.Then(x => _steps.ThenTheStatusCodeShouldBe(HttpStatusCode.OK))
|
||||
|
@ -39,7 +39,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
Port = 51179,
|
||||
}
|
||||
},
|
||||
UpstreamPathTemplate = "/",
|
||||
@ -50,7 +50,7 @@ namespace Ocelot.AcceptanceTests
|
||||
|
||||
var input = "people";
|
||||
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51879", "/", 200, "Hello from Laura", "\"people\""))
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51179", "/", 200, "Hello from Laura", "\"people\""))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunning())
|
||||
.And(x => _steps.GivenThePostHasGzipContent(input))
|
||||
|
@ -327,7 +327,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
Port = 52866,
|
||||
}
|
||||
},
|
||||
UpstreamPathTemplate = "/",
|
||||
@ -336,7 +336,7 @@ namespace Ocelot.AcceptanceTests
|
||||
}
|
||||
};
|
||||
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51879", "/", 200, "Accept"))
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:52866", "/", 200, "Accept"))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunning())
|
||||
.And(x => _steps.GivenIAddAHeader("Accept", "text/html,application/xhtml+xml,application/xml;"))
|
||||
@ -362,7 +362,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
Port = 51874,
|
||||
}
|
||||
},
|
||||
UpstreamPathTemplate = "/",
|
||||
@ -371,7 +371,7 @@ namespace Ocelot.AcceptanceTests
|
||||
}
|
||||
};
|
||||
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51879", "/", 200, "Accept"))
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51874", "/", 200, "Accept"))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunning())
|
||||
.And(x => _steps.GivenIAddAHeader("Accept", "text/html"))
|
||||
|
@ -40,7 +40,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
Port = 58814,
|
||||
}
|
||||
},
|
||||
UpstreamPathTemplate = "/",
|
||||
@ -51,7 +51,7 @@ namespace Ocelot.AcceptanceTests
|
||||
|
||||
var cache = new FakeHttpClientCache();
|
||||
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51879", 200, "Hello from Laura"))
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:58814", 200, "Hello from Laura"))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunningWithFakeHttpClientCache(cache))
|
||||
.When(x => _steps.WhenIGetUrlOnTheApiGateway("/"))
|
||||
@ -80,7 +80,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
Port = 58817,
|
||||
}
|
||||
},
|
||||
UpstreamPathTemplate = "/",
|
||||
@ -95,7 +95,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
Port = 58817,
|
||||
}
|
||||
},
|
||||
UpstreamPathTemplate = "/two",
|
||||
@ -106,7 +106,7 @@ namespace Ocelot.AcceptanceTests
|
||||
|
||||
var cache = new FakeHttpClientCache();
|
||||
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51879", 200, "Hello from Laura"))
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:58817", 200, "Hello from Laura"))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunningWithFakeHttpClientCache(cache))
|
||||
.When(x => _steps.WhenIGetUrlOnTheApiGateway("/"))
|
||||
|
@ -166,7 +166,7 @@
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51872,
|
||||
Port = 51870,
|
||||
}
|
||||
},
|
||||
UpstreamPathTemplate = "/",
|
||||
@ -196,7 +196,7 @@
|
||||
}
|
||||
};
|
||||
|
||||
this.Given(x => x.GivenThereIsAPossiblyBrokenServiceRunningOn("http://localhost:51872", "Hello from Laura"))
|
||||
this.Given(x => x.GivenThereIsAPossiblyBrokenServiceRunningOn("http://localhost:51870", "Hello from Laura"))
|
||||
.And(x => x.GivenThereIsAServiceRunningOn("http://localhost:51880/", 200, "Hello from Tom", 0))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunningWithPolly())
|
||||
|
@ -34,7 +34,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
Port = 59892,
|
||||
}
|
||||
},
|
||||
UpstreamPathTemplate = "/{everything}",
|
||||
@ -43,7 +43,7 @@ namespace Ocelot.AcceptanceTests
|
||||
}
|
||||
};
|
||||
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51879", "/inline.132.bundle.js", 304))
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:59892", "/inline.132.bundle.js", 304))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunning())
|
||||
.When(x => _steps.WhenIGetUrlOnTheApiGateway("/inline.132.bundle.js"))
|
||||
|
@ -84,14 +84,14 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
Port = 57873,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51879/", "/", 200, "Hello from Laura"))
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:57873/", "/", 200, "Hello from Laura"))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunning())
|
||||
.When(x => _steps.WhenIGetUrlOnTheApiGateway("/"))
|
||||
@ -131,7 +131,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
Port = 50810,
|
||||
}
|
||||
},
|
||||
UpstreamPathTemplate = "/",
|
||||
@ -180,7 +180,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
Port = 50810,
|
||||
}
|
||||
},
|
||||
UpstreamPathTemplate = "/",
|
||||
@ -189,7 +189,7 @@ namespace Ocelot.AcceptanceTests
|
||||
}
|
||||
};
|
||||
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51879/", "/", 200, "Hello from Laura"))
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:50810/", "/", 200, "Hello from Laura"))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunning())
|
||||
.When(x => _steps.WhenIGetUrlOnTheApiGateway("/"))
|
||||
@ -263,7 +263,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
Port = 51005,
|
||||
}
|
||||
},
|
||||
UpstreamPathTemplate = "/{url}",
|
||||
@ -272,7 +272,7 @@ namespace Ocelot.AcceptanceTests
|
||||
}
|
||||
};
|
||||
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51879", "/", 200, "Hello from Laura"))
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51005", "/", 200, "Hello from Laura"))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunning())
|
||||
.When(x => _steps.WhenIGetUrlOnTheApiGateway(""))
|
||||
@ -297,7 +297,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
Port = 58589,
|
||||
}
|
||||
},
|
||||
UpstreamPathTemplate = "/",
|
||||
@ -306,7 +306,7 @@ namespace Ocelot.AcceptanceTests
|
||||
}
|
||||
};
|
||||
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51879", "/", 200, "Hello from Laura"))
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:58589", "/", 200, "Hello from Laura"))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunning())
|
||||
.When(x => _steps.WhenIGetUrlOnTheApiGateway("/"))
|
||||
@ -382,7 +382,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
Port = 51206,
|
||||
}
|
||||
},
|
||||
UpstreamPathTemplate = "/",
|
||||
@ -391,7 +391,7 @@ namespace Ocelot.AcceptanceTests
|
||||
}
|
||||
};
|
||||
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51879", "/api/products", 200, "Hello from Laura"))
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51206", "/api/products", 200, "Hello from Laura"))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunning())
|
||||
.When(x => _steps.WhenIGetUrlOnTheApiGateway("/"))
|
||||
@ -416,7 +416,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
Port = 51990,
|
||||
}
|
||||
},
|
||||
UpstreamPathTemplate = "/",
|
||||
@ -425,7 +425,7 @@ namespace Ocelot.AcceptanceTests
|
||||
}
|
||||
};
|
||||
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51879", "/api/products", 200, "Hello from Laura"))
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51990", "/api/products", 200, "Hello from Laura"))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunning())
|
||||
.When(x => _steps.WhenIGetUrlOnTheApiGateway("/"))
|
||||
@ -450,7 +450,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
Port = 58804,
|
||||
}
|
||||
},
|
||||
UpstreamPathTemplate = "/products/",
|
||||
@ -459,7 +459,7 @@ namespace Ocelot.AcceptanceTests
|
||||
}
|
||||
};
|
||||
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51879", "/products", 200, "Hello from Laura"))
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:58804", "/products", 200, "Hello from Laura"))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunning())
|
||||
.When(x => _steps.WhenIGetUrlOnTheApiGateway("/products"))
|
||||
@ -484,7 +484,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
Port = 54015,
|
||||
}
|
||||
},
|
||||
UpstreamPathTemplate = "/products",
|
||||
@ -493,7 +493,7 @@ namespace Ocelot.AcceptanceTests
|
||||
}
|
||||
};
|
||||
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51879", "/products", 200, "Hello from Laura"))
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:54015", "/products", 200, "Hello from Laura"))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunning())
|
||||
.When(x => _steps.WhenIGetUrlOnTheApiGateway("/products/"))
|
||||
@ -517,7 +517,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
Port = 54072,
|
||||
}
|
||||
},
|
||||
UpstreamPathTemplate = "/products/{productId}",
|
||||
@ -526,7 +526,7 @@ namespace Ocelot.AcceptanceTests
|
||||
}
|
||||
};
|
||||
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51879", "/products", 200, "Hello from Laura"))
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:54072", "/products", 200, "Hello from Laura"))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunning())
|
||||
.When(x => _steps.WhenIGetUrlOnTheApiGateway("/products/"))
|
||||
@ -550,7 +550,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
Port = 55961,
|
||||
}
|
||||
},
|
||||
UpstreamPathTemplate = "/products/{productId}",
|
||||
@ -559,7 +559,7 @@ namespace Ocelot.AcceptanceTests
|
||||
}
|
||||
};
|
||||
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51879", "/api/products/1", 200, "Some Product"))
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:55961", "/api/products/1", 200, "Some Product"))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunning())
|
||||
.When(x => _steps.WhenIGetUrlOnTheApiGateway("/products/1"))
|
||||
@ -584,7 +584,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
Port = 51116,
|
||||
}
|
||||
},
|
||||
UpstreamPathTemplate = "/{variantId}/products/{productId}",
|
||||
@ -593,7 +593,7 @@ namespace Ocelot.AcceptanceTests
|
||||
}
|
||||
};
|
||||
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51879", "/api/23/products/1", 200, "Some Product"))
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51116", "/api/23/products/1", 200, "Some Product"))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunning())
|
||||
.When(x => _steps.WhenIGetUrlOnTheApiGateway("23/products/1"))
|
||||
@ -618,7 +618,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
Port = 51809,
|
||||
}
|
||||
},
|
||||
UpstreamPathTemplate = "/products/{productId}",
|
||||
@ -627,7 +627,7 @@ namespace Ocelot.AcceptanceTests
|
||||
}
|
||||
};
|
||||
|
||||
this.Given(x => GivenThereIsAServiceRunningOn("http://localhost:51879", "/api/products/1", 200, "Some Product"))
|
||||
this.Given(x => GivenThereIsAServiceRunningOn("http://localhost:51809", "/api/products/1", 200, "Some Product"))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunning())
|
||||
.When(x => _steps.WhenIGetUrlOnTheApiGateway("/products/1"))
|
||||
@ -650,7 +650,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
Port = 56615,
|
||||
}
|
||||
},
|
||||
DownstreamScheme = "http",
|
||||
@ -660,7 +660,7 @@ namespace Ocelot.AcceptanceTests
|
||||
}
|
||||
};
|
||||
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51879", "/", 201, string.Empty))
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:56615", "/", 201, string.Empty))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunning())
|
||||
.And(x => _steps.GivenThePostHasContent("postContent"))
|
||||
@ -686,7 +686,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
Port = 57771,
|
||||
}
|
||||
},
|
||||
UpstreamHttpMethod = new List<string> { "Get" },
|
||||
@ -694,7 +694,7 @@ namespace Ocelot.AcceptanceTests
|
||||
}
|
||||
};
|
||||
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51879", "/newThing", 200, "Hello from Laura"))
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:57771", "/newThing", 200, "Hello from Laura"))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunning())
|
||||
.When(x => _steps.WhenIGetUrlOnTheApiGateway("/newThing?DeviceType=IphoneApp&Browser=moonpigIphone&BrowserString=-&CountryCode=123&DeviceName=iPhone 5 (GSM+CDMA)&OperatingSystem=iPhone OS 7.1.2&BrowserVersion=3708AdHoc&ipAddress=-"))
|
||||
@ -719,7 +719,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
Port = 55609,
|
||||
}
|
||||
},
|
||||
UpstreamPathTemplate = "/myApp1Name/api/{urlPath}",
|
||||
@ -728,7 +728,7 @@ namespace Ocelot.AcceptanceTests
|
||||
}
|
||||
};
|
||||
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51879", "/api/products/1", 200, "Some Product"))
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:55609", "/api/products/1", 200, "Some Product"))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunning())
|
||||
.When(x => _steps.WhenIGetUrlOnTheApiGateway("/myApp1Name/api/products/1"))
|
||||
@ -752,7 +752,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
Port = 59911,
|
||||
}
|
||||
},
|
||||
DownstreamScheme = "http",
|
||||
@ -762,7 +762,7 @@ namespace Ocelot.AcceptanceTests
|
||||
}
|
||||
};
|
||||
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51879", "", 201, string.Empty))
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:59911", "", 201, string.Empty))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunning())
|
||||
.And(x => _steps.GivenThePostHasContent("postContent"))
|
||||
@ -786,7 +786,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
Port = 50187,
|
||||
}
|
||||
},
|
||||
DownstreamScheme = "http",
|
||||
@ -796,7 +796,7 @@ namespace Ocelot.AcceptanceTests
|
||||
}
|
||||
};
|
||||
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51879", "/", 200, "Hello from Laura"))
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:50187", "/", 200, "Hello from Laura"))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunning())
|
||||
.When(x => _steps.WhenIGetUrlOnTheApiGateway("/"))
|
||||
@ -821,7 +821,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
Port = 54079,
|
||||
}
|
||||
},
|
||||
UpstreamPathTemplate = "/vacancy/",
|
||||
@ -837,7 +837,7 @@ namespace Ocelot.AcceptanceTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
Port = 54079,
|
||||
}
|
||||
},
|
||||
UpstreamPathTemplate = "/vacancy/{vacancyId}",
|
||||
@ -847,7 +847,7 @@ namespace Ocelot.AcceptanceTests
|
||||
}
|
||||
};
|
||||
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51879", "/api/v1/vacancy/1", 200, "Hello from Laura"))
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:54079", "/api/v1/vacancy/1", 200, "Hello from Laura"))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunning())
|
||||
.When(x => _steps.WhenIGetUrlOnTheApiGateway("api/vacancy/1"))
|
||||
|
@ -53,7 +53,7 @@ namespace Ocelot.IntegrationTests
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
Port = 51611,
|
||||
},
|
||||
},
|
||||
UpstreamPathTemplate = "/",
|
||||
@ -63,7 +63,7 @@ namespace Ocelot.IntegrationTests
|
||||
};
|
||||
|
||||
this.Given(x => GivenThereIsAConfiguration(configuration))
|
||||
.And(x => GivenThereIsAServiceRunningOn("http://localhost:51879"))
|
||||
.And(x => GivenThereIsAServiceRunningOn("http://localhost:51611"))
|
||||
.And(x => GivenOcelotIsRunning())
|
||||
.When(x => WhenIGetUrlOnTheApiGatewayMultipleTimesWithDifferentHeaderValues("/", 300))
|
||||
.Then(x => ThenTheSameHeaderValuesAreReturnedByTheDownstreamService())
|
||||
|
Loading…
x
Reference in New Issue
Block a user