Skip to content

Commit

Permalink
add WireMock assertions (Netflix#1572)
Browse files Browse the repository at this point in the history
  • Loading branch information
sullis authored and argha-c committed Aug 1, 2023
1 parent cad4f62 commit 0a01b84
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
import static com.github.tomakehurst.wiremock.client.WireMock.anyUrl;
import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
import static com.github.tomakehurst.wiremock.client.WireMock.get;
import static com.github.tomakehurst.wiremock.client.WireMock.getRequestedFor;
import static com.github.tomakehurst.wiremock.client.WireMock.ok;
import static com.github.tomakehurst.wiremock.client.WireMock.post;
import static com.github.tomakehurst.wiremock.client.WireMock.verify;
Expand Down Expand Up @@ -294,6 +295,7 @@ void zuulWillRetryHttpGetWhenOriginReturns503(final String description, final Ok
Response response = okHttp.newCall(request).execute();
assertThat(response.code()).isEqualTo(503);
assertThat(response.body().string()).isEqualTo("");
verify(2, getRequestedFor(anyUrl()));
}

@ParameterizedTest
Expand All @@ -310,6 +312,7 @@ void httpGetReturnsStatus500DueToConnectionResetByPeer(final String description,
Response response = okHttp.newCall(request).execute();
assertThat(response.code()).isEqualTo(500);
assertThat(response.body().string()).isEqualTo("");
verify(1, getRequestedFor(anyUrl()));
}

@ParameterizedTest
Expand Down

0 comments on commit 0a01b84

Please sign in to comment.