Skip to content

Commit

Permalink
Cleanup ee9 DefaultServletTest
Browse files Browse the repository at this point in the history
+ Reenable disabled test testListingContextBreakout
  • Loading branch information
joakime committed Jun 17, 2024
1 parent bbc3430 commit 7cf5479
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
import org.hamcrest.Matchers;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.OS;
import org.junit.jupiter.api.extension.ExtendWith;
Expand Down Expand Up @@ -530,7 +529,7 @@ public static Stream<Arguments> contextBreakoutScenarios()
);

// A Raw Question mark in the prefix can be interpreted as a query section
if (prefix.contains("?"))
if (prefix.contains("?") || prefix.contains(";"))
{
scenarios.addScenario(
"GET " + prefix + "/../index.html",
Expand Down Expand Up @@ -635,14 +634,15 @@ public static Stream<Arguments> contextBreakoutScenarios()

@ParameterizedTest
@MethodSource("contextBreakoutScenarios")
@Disabled // TODO
public void testListingContextBreakout(Scenario scenario) throws Exception
{
Path docRoot = workDir.getEmptyPathDir().resolve("docroot");
FS.ensureDirExists(docRoot);

startServer((context) ->
{
context.setBaseResource(ResourceFactory.of(context).newResource(docRoot));

ServletHolder defholder = context.addServlet(DefaultServlet.class, "/");
defholder.setInitParameter("dirAllowed", "true");
defholder.setInitParameter("redirectWelcome", "false");
Expand Down

0 comments on commit 7cf5479

Please sign in to comment.