Skip to content

Commit 8c816dd

Browse files
committed
Updating /proxy behavior and tests for javadoc.jetty.org reality
1 parent e3a76fc commit 8c816dd

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

tests/test-distribution/src/test/java/org/eclipse/jetty/tests/distribution/DemoBaseTests.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,10 @@ public void testJavadocProxy() throws Exception
172172
assertTrue(run.awaitConsoleLogsFor("Started @", 10, TimeUnit.SECONDS));
173173

174174
startHttpClient(true);
175-
ContentResponse response = client.GET("http://localhost:" + httpPort + "/proxy/current/");
175+
ContentResponse response = client.GET("http://localhost:" + httpPort + "/proxy/jetty-12/index.html");
176176
assertEquals(HttpStatus.OK_200, response.getStatus());
177177
String body = response.getContentAsString();
178-
assertThat("Expecting APIdoc contents", body, containsString("All Classes"));
179-
assertThat("Expecting APIdoc contents", body, containsString("<title>Overview (Jetty :: Project 9."));
178+
assertThat("Expecting APIdoc contents", body, containsString("<title>Overview (Eclipse Jetty API Doc"));
180179
}
181180
}
182181

tests/test-webapps/test-proxy-webapp/src/main/webapp/WEB-INF/web.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@
88
<servlet-class>org.eclipse.jetty.proxy.ProxyServlet$Transparent</servlet-class>
99
<init-param>
1010
<param-name>proxyTo</param-name>
11-
<param-value>https://jetty.org/javadoc/jetty-9/index.html?overview-summary.html</param-value>
11+
<param-value>https://javadoc.jetty.org/</param-value>
1212
</init-param>
1313
<init-param>
1414
<param-name>hostHeader</param-name>
15-
<param-value>eclipse.dev</param-value>
15+
<param-value>javadoc.jetty.org</param-value>
1616
</init-param>
1717
<load-on-startup>1</load-on-startup>
1818
<async-supported>true</async-supported>
1919
</servlet>
2020

2121
<servlet-mapping>
2222
<servlet-name>JavadocTransparentProxy</servlet-name>
23-
<url-pattern>/current/*</url-pattern>
23+
<url-pattern>/*</url-pattern>
2424
</servlet-mapping>
2525

2626
</web-app>

tests/test-webapps/test-proxy-webapp/src/test/java/org/eclipse/jetty/ProxyWebAppTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public void teardown()
8181
@Tag("external")
8282
public void testProxyRequest() throws InterruptedException, ExecutionException, TimeoutException
8383
{
84-
ContentResponse response = client.newRequest(server.getURI().resolve("/proxy/current/"))
84+
ContentResponse response = client.newRequest(server.getURI().resolve("/proxy/jetty-12/index.html"))
8585
.followRedirects(false)
8686
.send();
8787

@@ -92,7 +92,6 @@ public void testProxyRequest() throws InterruptedException, ExecutionException,
9292
assertThat("response status", response.getStatus(), is(HttpStatus.OK_200));
9393
// Expecting a Javadoc / APIDoc response - look for something unique for APIdoc.
9494
String body = response.getContentAsString();
95-
assertThat(body, containsString("All&nbsp;Classes"));
96-
assertThat(body, containsString("<title>Overview (Jetty :: Project 9."));
95+
assertThat(body, containsString("<title>Overview (Eclipse Jetty API Doc"));
9796
}
9897
}

0 commit comments

Comments
 (0)