Skip to content

Commit

Permalink
use the sharedHTTPClient
Browse files Browse the repository at this point in the history
Signed-off-by: Mattia Lavacca <[email protected]>
  • Loading branch information
mlavacca committed Apr 22, 2024
1 parent f0e1931 commit f5f4aff
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/integration/test_httproute.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,11 @@ func TestHTTPRoute(t *testing.T) {
waitTick = time.Second
)

httpClient := helpers.MustCreateHTTPClient(t, nil, "")

// route to /test path of service httpbin should receive a 200 OK response.
request := helpers.MustBuildRequest(t, GetCtx(), http.MethodGet, "http://"+gatewayIPAddress+"/test", "")
require.Eventually(
t,
testutils.GetResponseBodyContains(t, clients, httpClient, request, "<title>httpbin.org</title>"),
testutils.GetResponseBodyContains(t, clients, sharedHTTPClient, request, "<title>httpbin.org</title>"),
httpRouteAccessTimeout,
time.Second,
)
Expand All @@ -112,7 +110,7 @@ func TestHTTPRoute(t *testing.T) {
request = helpers.MustBuildRequest(t, GetCtx(), http.MethodGet, "http://"+gatewayIPAddress+"/test/1234", "")
require.Eventually(
t,
testutils.GetResponseBodyContains(t, clients, httpClient, request, "<h1>Not Found</h1>"),
testutils.GetResponseBodyContains(t, clients, sharedHTTPClient, request, "<h1>Not Found</h1>"),
httpRouteAccessTimeout,
time.Second,
)
Expand Down

0 comments on commit f5f4aff

Please sign in to comment.