Permalink
Browse files

improve PullAPI test error info

  • Loading branch information...
1 parent be0a510 commit 5a9741680bde25c0b20d96140a2727c71b4a1cfd @suwatch suwatch committed Jan 16, 2013
Showing with 5 additions and 5 deletions.
  1. +5 −5 Kudu.FunctionalTests/DeploymentManagerTests.cs
@@ -198,7 +198,7 @@ public void PullApiTestGitHubFormat()
{ "payload", githubPayload }
};
- client.PostAsync("deploy", new FormUrlEncodedContent(post)).Wait();
+ client.PostAsync("deploy", new FormUrlEncodedContent(post)).Result.EnsureSuccessful();
var results = appManager.DeploymentManager.GetResultsAsync().Result.ToList();
Assert.Equal(1, results.Count);
@@ -224,7 +224,7 @@ public void PullApiTestBitbucketFormat()
{ "payload", bitbucketPayload }
};
- client.PostAsync("deploy", new FormUrlEncodedContent(post)).Wait();
+ client.PostAsync("deploy", new FormUrlEncodedContent(post)).Result.EnsureSuccessful();
var results = appManager.DeploymentManager.GetResultsAsync().Result.ToList();
Assert.Equal(1, results.Count);
@@ -306,7 +306,7 @@ public void PullApiTestGitlabHQFormat()
ApplicationManager.Run(appName, appManager =>
{
var client = CreateClient(appManager);
- client.PostAsync("deploy", new StringContent(payload)).Wait();
+ client.PostAsync("deploy", new StringContent(payload)).Result.EnsureSuccessful();
var results = appManager.DeploymentManager.GetResultsAsync().Result.ToList();
Assert.Equal(1, results.Count);
@@ -332,7 +332,7 @@ public void PullApiTestCodebaseFormat()
{ "payload", payload }
};
- client.PostAsync("deploy", new FormUrlEncodedContent(post)).Wait();
+ client.PostAsync("deploy", new FormUrlEncodedContent(post)).Result.EnsureSuccessful();
var results = appManager.DeploymentManager.GetResultsAsync().Result.ToList();
Assert.Equal(1, results.Count);
@@ -382,7 +382,7 @@ public void PullApiTestGenericFormatCustomBranch()
{ "payload", payload }
};
- client.PostAsync("deploy", new FormUrlEncodedContent(post)).Wait();
+ client.PostAsync("deploy", new FormUrlEncodedContent(post)).Result.EnsureSuccessful();
var results = appManager.DeploymentManager.GetResultsAsync().Result.ToList();
Assert.Equal(1, results.Count);
Assert.Equal(DeployStatus.Success, results[0].Status);

0 comments on commit 5a97416

Please sign in to comment.