another script change to find error

This commit is contained in:
Tom Pallister 2017-10-10 17:52:38 +01:00
parent d4f972125e
commit 4d3a7ae5e1
2 changed files with 67 additions and 18 deletions

View File

@ -298,34 +298,42 @@ Task("DownloadGitHubReleaseArtifacts")
.IsDependentOn("UpdateVersionInfo")
.Does(() =>
{
Information("DownloadGitHubReleaseArtifacts");
try
{
Information("DownloadGitHubReleaseArtifacts");
EnsureDirectoryExists(packagesDir);
EnsureDirectoryExists(packagesDir);
Information("Directory exists...");
Information("Directory exists...");
var releaseUrl = tagsUrl + releaseTag;
var releaseUrl = tagsUrl + releaseTag;
Information("Release url " + releaseUrl);
Information("Release url " + releaseUrl);
var assets_url = ParseJson(GetResource(releaseUrl))
.GetValue("assets_url")
.Value<string>();
var assets_url = ParseJson(GetResource(releaseUrl))
.GetValue("assets_url")
.Value<string>();
Information("Assets url " + assets_url);
Information("Assets url " + assets_url);
foreach(var asset in DeserializeJson<JArray>(GetResource(assets_url)))
{
Information("In the loop..");
foreach(var asset in DeserializeJson<JArray>(GetResource(assets_url)))
{
Information("In the loop..");
var file = packagesDir + File(asset.Value<string>("name"));
var file = packagesDir + File(asset.Value<string>("name"));
Information("Downloading " + file);
Information("Downloading " + file);
DownloadFile(asset.Value<string>("browser_download_url"), file);
}
DownloadFile(asset.Value<string>("browser_download_url"), file);
}
Information("Out of the loop...");
Information("Out of the loop...");
}
catch(Exception exception)
{
Information("There was an exception " + exception);
throw;
}
});
Task("ReleasePackagesToStableFeed")

View File

@ -61,6 +61,47 @@ namespace Ocelot.AcceptanceTests
.BDDfy();
}
[Fact]
public void bug()
{
var configuration = new FileConfiguration
{
ReRoutes = new List<FileReRoute>
{
new FileReRoute
{
DownstreamPathTemplate = "/api/v1/vacancy",
DownstreamScheme = "http",
DownstreamHost = "localhost",
DownstreamPort = 51879,
UpstreamPathTemplate = "/vacancy/",
UpstreamHttpMethod = new List<string> { "Options", "Put", "Get", "Post", "Delete" },
ServiceName = "botCore",
LoadBalancer = "LeastConnection"
},
new FileReRoute
{
DownstreamPathTemplate = "/api/v1/vacancy/{vacancyId}",
DownstreamScheme = "http",
DownstreamHost = "localhost",
DownstreamPort = 51879,
UpstreamPathTemplate = "/vacancy/{vacancyId}",
UpstreamHttpMethod = new List<string> { "Options", "Put", "Get", "Post", "Delete" },
ServiceName = "botCore",
LoadBalancer = "LeastConnection"
}
}
};
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51879/api/v1/vacancy/1", 200, "Hello from Laura"))
.And(x => _steps.GivenThereIsAConfiguration(configuration))
.And(x => _steps.GivenOcelotIsRunning())
.When(x => _steps.WhenIGetUrlOnTheApiGateway("/vacancy/1"))
.Then(x => _steps.ThenTheStatusCodeShouldBe(HttpStatusCode.OK))
.And(x => _steps.ThenTheResponseBodyShouldBe("Hello from Laura"))
.BDDfy();
}
[Fact]
public void should_return_response_200_when_path_missing_forward_slash_as_first_char()
{