Skip to content

Commit

Permalink
Updating core server RequestTest for added URI.path
Browse files Browse the repository at this point in the history
  • Loading branch information
joakime committed Sep 13, 2022
1 parent 9ebaf3c commit 045af3d
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import java.io.ByteArrayOutputStream;
import java.nio.ByteBuffer;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;

import org.eclipse.jetty.http.HttpCookie;
import org.eclipse.jetty.http.HttpHeader;
Expand All @@ -32,7 +31,6 @@

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
Expand Down Expand Up @@ -103,8 +101,8 @@ public void testConnectRequestURLSameAsHost() throws Exception
HttpTester.Response response = HttpTester.parseResponse(connector.getResponse(request));
assertEquals(HttpStatus.OK_200, response.getStatus());
String responseBody = response.getContent();
assertThat(responseBody, containsString("httpURI=http://myhost:9999"));
assertThat(responseBody, containsString("httpURI.path=null"));
assertThat(responseBody, containsString("httpURI=http://myhost:9999/"));
assertThat(responseBody, containsString("httpURI.path=/"));
assertThat(responseBody, containsString("servername=myhost"));
}

Expand All @@ -121,8 +119,8 @@ public void testConnectRequestURLDifferentThanHost() throws Exception
HttpTester.Response response = HttpTester.parseResponse(connector.getResponse(request));
assertEquals(HttpStatus.OK_200, response.getStatus());
String responseBody = response.getContent();
assertThat(responseBody, containsString("httpURI=http://myhost:9999"));
assertThat(responseBody, containsString("httpURI.path=null"));
assertThat(responseBody, containsString("httpURI=http://myhost:9999/"));
assertThat(responseBody, containsString("httpURI.path=/"));
assertThat(responseBody, containsString("servername=myhost"));
}

Expand Down

0 comments on commit 045af3d

Please sign in to comment.