diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/TestCasesProvider.java b/integration-test/src/test/java/com/reajason/javaweb/integration/TestCasesProvider.java index 4f2f0ee8..01620f97 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/TestCasesProvider.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/TestCasesProvider.java @@ -7,10 +7,7 @@ import com.reajason.javaweb.memshell.ShellType; import org.junit.jupiter.params.provider.Arguments; import org.testcontainers.shaded.org.apache.commons.lang3.tuple.Triple; -import java.util.Collections; -import java.util.HashSet; -import java.util.Objects; -import java.util.Set; +import java.util.*; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -22,20 +19,25 @@ import static org.junit.jupiter.params.provider.Arguments.arguments; */ public class TestCasesProvider { - public static Stream getTestCases(String imageName, Server server, Set testShellTypes, Set testPackers, Set> unSupportedCases) { + public static Stream getTestCases(String imageName, Server server, List testShellTypes, List testPackers, List> unSupportedCases) { return getTestCases(imageName, server, testShellTypes, testPackers, unSupportedCases, null); } - public static Stream getTestCases(String imageName, Server server, Set testShellTypes, Set testPackers, Set> unSupportedCases, Set unSupportedShellTools) { - Set supportedShellTools = new HashSet<>(server.getShell().getSupportedShellTools()); + public static Stream getTestCases(String imageName, Server server, List testShellTypes, List testPackers, List> unSupportedCases, List unSupportedShellTools) { + Set supportedShellTools = new TreeSet<>(server.getShell().getSupportedShellTools()); if (unSupportedShellTools != null) { - supportedShellTools.removeAll(unSupportedShellTools); + unSupportedShellTools.forEach(supportedShellTools::remove); } Set unSupported = unSupportedCases == null ? Collections.emptySet() : unSupportedCases.stream().map(i -> i.getLeft() + i.getMiddle() + i.getRight()).collect(Collectors.toSet()); return supportedShellTools.stream() .flatMap(supportedShellTool -> { - Set toolSupportedShellTypes = new HashSet<>(server.getShell().getSupportedShellTypes(supportedShellTool)); - toolSupportedShellTypes.retainAll(testShellTypes); + List toolSupportedShellTypes = new ArrayList<>(); + Set supportedShellTypes = server.getShell().getSupportedShellTypes(supportedShellTool); + for (String testShellType : testShellTypes) { + if (supportedShellTypes.contains(testShellType)) { + toolSupportedShellTypes.add(testShellType); + } + } return toolSupportedShellTypes.stream().flatMap(supportedShellType -> { if (supportedShellType.startsWith(ShellType.AGENT)) { if (!unSupported.contains(supportedShellType + supportedShellTool + Packers.AgentJar)) { @@ -56,7 +58,7 @@ public class TestCasesProvider { }); } - public static Stream getTestCases(String imageName, Server server, Set testShellTypes, Set testPackers) { + public static Stream getTestCases(String imageName, Server server, List testShellTypes, List testPackers) { return getTestCases(imageName, server, testShellTypes, testPackers, null); } } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/glassfish/GlassFish3ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/glassfish/GlassFish3ContainerTest.java index 0297aff5..e421815e 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/glassfish/GlassFish3ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/glassfish/GlassFish3ContainerTest.java @@ -19,13 +19,11 @@ import org.testcontainers.junit.jupiter.Testcontainers; import org.testcontainers.shaded.org.apache.commons.lang3.tuple.Triple; import java.time.Duration; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; -import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException; import static com.reajason.javaweb.integration.ShellAssertionTool.testShellInjectAssertOk; -import static org.hamcrest.MatcherAssert.assertThat; /** * @author ReaJason @@ -51,9 +49,13 @@ public class GlassFish3ContainerTest { static Stream casesProvider() { Server server = Server.GlassFish; - Set supportedShellTypes = Set.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); - return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); + List supportedShellTypes = List.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE, ShellType.AGENT_FILTER_CHAIN, ShellType.CATALINA_AGENT_CONTEXT_VALVE); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); + List> unSupportedCases = List.of( + Triple.of(ShellType.CATALINA_AGENT_CONTEXT_VALVE, ShellTool.Godzilla, Packers.AgentJar), // ClassFormatError + Triple.of(ShellType.AGENT_FILTER_CHAIN, ShellTool.Godzilla, Packers.AgentJar) // ClassFormatError + ); + return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers, unSupportedCases); } @AfterAll diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/glassfish/GlassFish4ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/glassfish/GlassFish4ContainerTest.java index a02d0f86..5fbd3fc1 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/glassfish/GlassFish4ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/glassfish/GlassFish4ContainerTest.java @@ -1,10 +1,10 @@ package com.reajason.javaweb.integration.glassfish; import com.reajason.javaweb.integration.TestCasesProvider; -import com.reajason.javaweb.memshell.ShellType; +import com.reajason.javaweb.memshell.Packers; import com.reajason.javaweb.memshell.Server; import com.reajason.javaweb.memshell.ShellTool; -import com.reajason.javaweb.memshell.Packers; +import com.reajason.javaweb.memshell.ShellType; import lombok.extern.slf4j.Slf4j; import net.bytebuddy.jar.asm.Opcodes; import org.junit.jupiter.api.AfterAll; @@ -16,18 +16,15 @@ import org.testcontainers.containers.GenericContainer; import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import org.testcontainers.shaded.org.apache.commons.lang3.tuple.Triple; import java.time.Duration; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; -import static com.reajason.javaweb.integration.ContainerTool.glassfishPid; import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException; import static com.reajason.javaweb.integration.ShellAssertionTool.testShellInjectAssertOk; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.params.provider.Arguments.arguments; /** * @author ReaJason @@ -53,8 +50,8 @@ public class GlassFish4ContainerTest { static Stream casesProvider() { Server server = Server.GlassFish; - Set supportedShellTypes = Set.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); + List supportedShellTypes = List.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE, ShellType.AGENT_FILTER_CHAIN, ShellType.CATALINA_AGENT_CONTEXT_VALVE); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/glassfish/GlassFish501ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/glassfish/GlassFish501ContainerTest.java index fdd41c93..bdfa49a8 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/glassfish/GlassFish501ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/glassfish/GlassFish501ContainerTest.java @@ -16,7 +16,7 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; @@ -43,8 +43,8 @@ public class GlassFish501ContainerTest { static Stream casesProvider() { Server server = Server.GlassFish; - Set supportedShellTypes = Set.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); + List supportedShellTypes = List.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE, ShellType.AGENT_FILTER_CHAIN, ShellType.CATALINA_AGENT_CONTEXT_VALVE); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/glassfish/GlassFish510ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/glassfish/GlassFish510ContainerTest.java index b87f44af..5ff30f76 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/glassfish/GlassFish510ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/glassfish/GlassFish510ContainerTest.java @@ -1,10 +1,10 @@ package com.reajason.javaweb.integration.glassfish; import com.reajason.javaweb.integration.TestCasesProvider; -import com.reajason.javaweb.memshell.ShellType; +import com.reajason.javaweb.memshell.Packers; import com.reajason.javaweb.memshell.Server; import com.reajason.javaweb.memshell.ShellTool; -import com.reajason.javaweb.memshell.Packers; +import com.reajason.javaweb.memshell.ShellType; import lombok.extern.slf4j.Slf4j; import net.bytebuddy.jar.asm.Opcodes; import org.junit.jupiter.api.AfterAll; @@ -16,14 +16,13 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException; import static com.reajason.javaweb.integration.ShellAssertionTool.testShellInjectAssertOk; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.params.provider.Arguments.arguments; /** * @author ReaJason @@ -44,8 +43,8 @@ public class GlassFish510ContainerTest { static Stream casesProvider() { Server server = Server.GlassFish; - Set supportedShellTypes = Set.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); + List supportedShellTypes = List.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE, ShellType.AGENT_FILTER_CHAIN, ShellType.CATALINA_AGENT_CONTEXT_VALVE); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/glassfish/GlassFish6ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/glassfish/GlassFish6ContainerTest.java index aed587fc..b97a1cb8 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/glassfish/GlassFish6ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/glassfish/GlassFish6ContainerTest.java @@ -16,7 +16,7 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; @@ -43,9 +43,9 @@ public class GlassFish6ContainerTest { static Stream casesProvider() { Server server = Server.GlassFish; - Set supportedShellTypes = Set.of(ShellType.JAKARTA_FILTER, ShellType.JAKARTA_LISTENER, ShellType.JAKARTA_VALVE); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); - return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); + List supportedShellTypes = List.of(ShellType.JAKARTA_FILTER, ShellType.JAKARTA_LISTENER, ShellType.JAKARTA_VALVE, ShellType.AGENT_FILTER_CHAIN, ShellType.CATALINA_AGENT_CONTEXT_VALVE); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); + return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers, null, List.of(ShellTool.AntSword)); } @AfterAll diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/glassfish/GlassFish7ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/glassfish/GlassFish7ContainerTest.java index e8fa27e3..54d319fe 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/glassfish/GlassFish7ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/glassfish/GlassFish7ContainerTest.java @@ -16,7 +16,7 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; @@ -43,9 +43,9 @@ public class GlassFish7ContainerTest { static Stream casesProvider() { Server server = Server.GlassFish; - Set supportedShellTypes = Set.of(ShellType.JAKARTA_FILTER, ShellType.JAKARTA_LISTENER, ShellType.JAKARTA_VALVE); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX); - return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); + List supportedShellTypes = List.of(ShellType.JAKARTA_FILTER, ShellType.JAKARTA_LISTENER, ShellType.JAKARTA_VALVE, ShellType.AGENT_FILTER_CHAIN, ShellType.CATALINA_AGENT_CONTEXT_VALVE); + List testPackers = List.of(Packers.JSP, Packers.JSPX); + return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers, null, List.of(ShellTool.AntSword)); } @AfterAll diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/jbossas/Jboss423ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/jbossas/Jboss423ContainerTest.java index 4df7b341..a424f811 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/jbossas/Jboss423ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/jbossas/Jboss423ContainerTest.java @@ -16,7 +16,7 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; @@ -43,9 +43,9 @@ public class Jboss423ContainerTest { static Stream casesProvider() { Server server = Server.JBossAS; - Set supportedShellTypes = Set.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE, + List supportedShellTypes = List.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE, ShellType.AGENT_FILTER_CHAIN, ShellType.CATALINA_AGENT_CONTEXT_VALVE); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/jbossas/Jboss510ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/jbossas/Jboss510ContainerTest.java index b74ce9d2..7d3963cb 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/jbossas/Jboss510ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/jbossas/Jboss510ContainerTest.java @@ -16,7 +16,7 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; @@ -43,11 +43,11 @@ public class Jboss510ContainerTest { static Stream casesProvider() { Server server = Server.JBossAS; - Set supportedShellTypes = Set.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE, + List supportedShellTypes = List.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE, ShellType.AGENT_FILTER_CHAIN, ShellType.CATALINA_AGENT_CONTEXT_VALVE); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers, - null, Set.of(ShellTool.Behinder) // Behinder SocketTimeOuts + null, List.of(ShellTool.Behinder) // Behinder SocketTimeOuts ); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/jbossas/Jboss610ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/jbossas/Jboss610ContainerTest.java index b56b86b2..414677ff 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/jbossas/Jboss610ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/jbossas/Jboss610ContainerTest.java @@ -1,10 +1,10 @@ package com.reajason.javaweb.integration.jbossas; import com.reajason.javaweb.integration.TestCasesProvider; -import com.reajason.javaweb.memshell.ShellType; +import com.reajason.javaweb.memshell.Packers; import com.reajason.javaweb.memshell.Server; import com.reajason.javaweb.memshell.ShellTool; -import com.reajason.javaweb.memshell.Packers; +import com.reajason.javaweb.memshell.ShellType; import lombok.extern.slf4j.Slf4j; import net.bytebuddy.jar.asm.Opcodes; import org.junit.jupiter.api.AfterAll; @@ -16,14 +16,13 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException; import static com.reajason.javaweb.integration.ShellAssertionTool.testShellInjectAssertOk; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.params.provider.Arguments.arguments; /** * @author ReaJason @@ -44,9 +43,9 @@ public class Jboss610ContainerTest { static Stream casesProvider() { Server server = Server.JBossAS; - Set supportedShellTypes = Set.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE, + List supportedShellTypes = List.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE, ShellType.AGENT_FILTER_CHAIN, ShellType.CATALINA_AGENT_CONTEXT_VALVE); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/jbossas/Jboss711ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/jbossas/Jboss711ContainerTest.java index 5cd1ab09..4b1a596c 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/jbossas/Jboss711ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/jbossas/Jboss711ContainerTest.java @@ -16,7 +16,7 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; @@ -46,9 +46,9 @@ public class Jboss711ContainerTest { */ static Stream casesProvider() { Server server = Server.JBossAS; - Set supportedShellTypes = Set.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE, + List supportedShellTypes = List.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE, ShellType.AGENT_FILTER_CHAIN, ShellType.CATALINA_AGENT_CONTEXT_VALVE); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.ScriptEngine); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.ScriptEngine); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/jbosseap/JbossEap6ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/jbosseap/JbossEap6ContainerTest.java index ec2c84f0..e1859ed1 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/jbosseap/JbossEap6ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/jbosseap/JbossEap6ContainerTest.java @@ -16,7 +16,7 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; @@ -43,9 +43,9 @@ public class JbossEap6ContainerTest { static Stream casesProvider() { Server server = Server.JBossEAP6; - Set supportedShellTypes = Set.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE, + List supportedShellTypes = List.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE, ShellType.AGENT_FILTER_CHAIN, ShellType.CATALINA_AGENT_CONTEXT_VALVE); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.ScriptEngine); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.ScriptEngine); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/jbosseap/JbossEap7ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/jbosseap/JbossEap7ContainerTest.java index ca737f31..5a11f81c 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/jbosseap/JbossEap7ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/jbosseap/JbossEap7ContainerTest.java @@ -16,7 +16,7 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; @@ -43,8 +43,8 @@ public class JbossEap7ContainerTest { static Stream casesProvider() { Server server = Server.JBossEAP7; - Set supportedShellTypes = Set.of(ShellType.FILTER, ShellType.LISTENER, ShellType.UNDERTOW_AGENT_SERVLET_HANDLER); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.ScriptEngine); + List supportedShellTypes = List.of(ShellType.FILTER, ShellType.LISTENER, ShellType.UNDERTOW_AGENT_SERVLET_HANDLER); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.ScriptEngine); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty10ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty10ContainerTest.java index 72968b6a..5f54b953 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty10ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty10ContainerTest.java @@ -1,10 +1,10 @@ package com.reajason.javaweb.integration.jetty; import com.reajason.javaweb.integration.TestCasesProvider; -import com.reajason.javaweb.memshell.ShellType; +import com.reajason.javaweb.memshell.Packers; import com.reajason.javaweb.memshell.Server; import com.reajason.javaweb.memshell.ShellTool; -import com.reajason.javaweb.memshell.Packers; +import com.reajason.javaweb.memshell.ShellType; import lombok.extern.slf4j.Slf4j; import net.bytebuddy.jar.asm.Opcodes; import org.junit.jupiter.api.AfterAll; @@ -16,14 +16,13 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException; import static com.reajason.javaweb.integration.ShellAssertionTool.testShellInjectAssertOk; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.params.provider.Arguments.arguments; /** * @author ReaJason @@ -43,8 +42,8 @@ public class Jetty10ContainerTest { static Stream casesProvider() { Server server = Server.Jetty; - Set supportedShellTypes = Set.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.JETTY_AGENT_HANDLER); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); + List supportedShellTypes = List.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.JETTY_AGENT_HANDLER); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty11ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty11ContainerTest.java index c99e4c89..89d230d7 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty11ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty11ContainerTest.java @@ -16,7 +16,7 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; @@ -42,10 +42,10 @@ public class Jetty11ContainerTest { static Stream casesProvider() { Server server = Server.Jetty; - Set supportedShellTypes = Set.of(ShellType.JAKARTA_SERVLET, ShellType.JAKARTA_FILTER, ShellType.JAKARTA_LISTENER, ShellType.JETTY_AGENT_HANDLER); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); + List supportedShellTypes = List.of(ShellType.JAKARTA_SERVLET, ShellType.JAKARTA_FILTER, ShellType.JAKARTA_LISTENER, ShellType.JETTY_AGENT_HANDLER); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers, - null, Set.of(ShellTool.AntSword) // AntSword not supported Jakarta + null, List.of(ShellTool.AntSword) // AntSword not supported Jakarta ); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty61ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty61ContainerTest.java index cdb1c103..058138ab 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty61ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty61ContainerTest.java @@ -16,7 +16,7 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; @@ -42,8 +42,8 @@ public class Jetty61ContainerTest { static Stream casesProvider() { Server server = Server.Jetty; - Set supportedShellTypes = Set.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); + List supportedShellTypes = List.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty76ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty76ContainerTest.java index d10d0810..75bd8ce0 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty76ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty76ContainerTest.java @@ -1,10 +1,10 @@ package com.reajason.javaweb.integration.jetty; import com.reajason.javaweb.integration.TestCasesProvider; -import com.reajason.javaweb.memshell.ShellType; +import com.reajason.javaweb.memshell.Packers; import com.reajason.javaweb.memshell.Server; import com.reajason.javaweb.memshell.ShellTool; -import com.reajason.javaweb.memshell.Packers; +import com.reajason.javaweb.memshell.ShellType; import lombok.extern.slf4j.Slf4j; import net.bytebuddy.jar.asm.Opcodes; import org.junit.jupiter.api.AfterAll; @@ -16,14 +16,13 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException; import static com.reajason.javaweb.integration.ShellAssertionTool.testShellInjectAssertOk; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.params.provider.Arguments.arguments; /** * @author ReaJason @@ -43,8 +42,8 @@ public class Jetty76ContainerTest { static Stream casesProvider() { Server server = Server.Jetty; - Set supportedShellTypes = Set.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.JETTY_AGENT_HANDLER); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); + List supportedShellTypes = List.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.JETTY_AGENT_HANDLER); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty81ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty81ContainerTest.java index acb34bc0..093a0286 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty81ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty81ContainerTest.java @@ -1,10 +1,10 @@ package com.reajason.javaweb.integration.jetty; import com.reajason.javaweb.integration.TestCasesProvider; -import com.reajason.javaweb.memshell.ShellType; +import com.reajason.javaweb.memshell.Packers; import com.reajason.javaweb.memshell.Server; import com.reajason.javaweb.memshell.ShellTool; -import com.reajason.javaweb.memshell.Packers; +import com.reajason.javaweb.memshell.ShellType; import lombok.extern.slf4j.Slf4j; import net.bytebuddy.jar.asm.Opcodes; import org.junit.jupiter.api.AfterAll; @@ -16,14 +16,13 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException; import static com.reajason.javaweb.integration.ShellAssertionTool.testShellInjectAssertOk; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.params.provider.Arguments.arguments; /** * @author ReaJason @@ -43,8 +42,8 @@ public class Jetty81ContainerTest { static Stream casesProvider() { Server server = Server.Jetty; - Set supportedShellTypes = Set.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.JETTY_AGENT_HANDLER); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); + List supportedShellTypes = List.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.JETTY_AGENT_HANDLER); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty92ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty92ContainerTest.java index 2151af39..4819a0e5 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty92ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty92ContainerTest.java @@ -1,10 +1,10 @@ package com.reajason.javaweb.integration.jetty; import com.reajason.javaweb.integration.TestCasesProvider; -import com.reajason.javaweb.memshell.ShellType; +import com.reajason.javaweb.memshell.Packers; import com.reajason.javaweb.memshell.Server; import com.reajason.javaweb.memshell.ShellTool; -import com.reajason.javaweb.memshell.Packers; +import com.reajason.javaweb.memshell.ShellType; import lombok.extern.slf4j.Slf4j; import net.bytebuddy.jar.asm.Opcodes; import org.junit.jupiter.api.AfterAll; @@ -16,14 +16,13 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException; import static com.reajason.javaweb.integration.ShellAssertionTool.testShellInjectAssertOk; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.params.provider.Arguments.arguments; /** * @author ReaJason @@ -44,8 +43,8 @@ public class Jetty92ContainerTest { static Stream casesProvider() { Server server = Server.Jetty; - Set supportedShellTypes = Set.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.JETTY_AGENT_HANDLER); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); + List supportedShellTypes = List.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.JETTY_AGENT_HANDLER); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty93ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty93ContainerTest.java index a318b89c..16241116 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty93ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty93ContainerTest.java @@ -1,10 +1,10 @@ package com.reajason.javaweb.integration.jetty; import com.reajason.javaweb.integration.TestCasesProvider; -import com.reajason.javaweb.memshell.ShellType; +import com.reajason.javaweb.memshell.Packers; import com.reajason.javaweb.memshell.Server; import com.reajason.javaweb.memshell.ShellTool; -import com.reajason.javaweb.memshell.Packers; +import com.reajason.javaweb.memshell.ShellType; import lombok.extern.slf4j.Slf4j; import net.bytebuddy.jar.asm.Opcodes; import org.junit.jupiter.api.AfterAll; @@ -16,14 +16,13 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException; import static com.reajason.javaweb.integration.ShellAssertionTool.testShellInjectAssertOk; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.params.provider.Arguments.arguments; /** * @author ReaJason @@ -43,8 +42,8 @@ public class Jetty93ContainerTest { static Stream casesProvider() { Server server = Server.Jetty; - Set supportedShellTypes = Set.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.JETTY_AGENT_HANDLER); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); + List supportedShellTypes = List.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.JETTY_AGENT_HANDLER); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty94ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty94ContainerTest.java index 67c99b6d..3ef50ed8 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty94ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/jetty/Jetty94ContainerTest.java @@ -1,10 +1,10 @@ package com.reajason.javaweb.integration.jetty; import com.reajason.javaweb.integration.TestCasesProvider; -import com.reajason.javaweb.memshell.ShellType; +import com.reajason.javaweb.memshell.Packers; import com.reajason.javaweb.memshell.Server; import com.reajason.javaweb.memshell.ShellTool; -import com.reajason.javaweb.memshell.Packers; +import com.reajason.javaweb.memshell.ShellType; import lombok.extern.slf4j.Slf4j; import net.bytebuddy.jar.asm.Opcodes; import org.junit.jupiter.api.AfterAll; @@ -16,14 +16,13 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException; import static com.reajason.javaweb.integration.ShellAssertionTool.testShellInjectAssertOk; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.params.provider.Arguments.arguments; /** * @author ReaJason @@ -43,8 +42,8 @@ public class Jetty94ContainerTest { static Stream casesProvider() { Server server = Server.Jetty; - Set supportedShellTypes = Set.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.JETTY_AGENT_HANDLER); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); + List supportedShellTypes = List.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.JETTY_AGENT_HANDLER); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/payara/Payara5201ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/payara/Payara5201ContainerTest.java index ce3921a4..69aa651b 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/payara/Payara5201ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/payara/Payara5201ContainerTest.java @@ -16,7 +16,7 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; @@ -43,8 +43,8 @@ public class Payara5201ContainerTest { static Stream casesProvider() { Server server = Server.Payara; - Set supportedShellTypes = Set.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize, Packers.ScriptEngine); + List supportedShellTypes = List.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE, ShellType.AGENT_FILTER_CHAIN, ShellType.CATALINA_AGENT_CONTEXT_VALVE); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize, Packers.ScriptEngine); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/payara/Payara520225ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/payara/Payara520225ContainerTest.java index 34e55d1a..ab0538ed 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/payara/Payara520225ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/payara/Payara520225ContainerTest.java @@ -1,10 +1,10 @@ package com.reajason.javaweb.integration.payara; import com.reajason.javaweb.integration.TestCasesProvider; -import com.reajason.javaweb.memshell.ShellType; +import com.reajason.javaweb.memshell.Packers; import com.reajason.javaweb.memshell.Server; import com.reajason.javaweb.memshell.ShellTool; -import com.reajason.javaweb.memshell.Packers; +import com.reajason.javaweb.memshell.ShellType; import lombok.extern.slf4j.Slf4j; import net.bytebuddy.jar.asm.Opcodes; import org.junit.jupiter.api.AfterAll; @@ -16,15 +16,13 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; -import static com.reajason.javaweb.integration.ContainerTool.glassfishPid; import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException; import static com.reajason.javaweb.integration.ShellAssertionTool.testShellInjectAssertOk; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.params.provider.Arguments.arguments; /** * @author ReaJason @@ -45,8 +43,8 @@ public class Payara520225ContainerTest { static Stream casesProvider() { Server server = Server.Payara; - Set supportedShellTypes = Set.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize, Packers.ScriptEngine); + List supportedShellTypes = List.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE, ShellType.AGENT_FILTER_CHAIN, ShellType.CATALINA_AGENT_CONTEXT_VALVE); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize, Packers.ScriptEngine); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/payara/Payara620222ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/payara/Payara620222ContainerTest.java index f28225f3..15b83b84 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/payara/Payara620222ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/payara/Payara620222ContainerTest.java @@ -16,7 +16,7 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; @@ -43,9 +43,9 @@ public class Payara620222ContainerTest { static Stream casesProvider() { Server server = Server.Payara; - Set supportedShellTypes = Set.of(ShellType.JAKARTA_FILTER, ShellType.JAKARTA_LISTENER, ShellType.JAKARTA_VALVE); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); - return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); + List supportedShellTypes = List.of(ShellType.JAKARTA_FILTER, ShellType.JAKARTA_LISTENER, ShellType.JAKARTA_VALVE, ShellType.AGENT_FILTER_CHAIN, ShellType.CATALINA_AGENT_CONTEXT_VALVE); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); + return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers, null, List.of(ShellTool.AntSword)); } @AfterAll diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/resin/Resin3116ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/resin/Resin3116ContainerTest.java index 961e2c91..76a85c5e 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/resin/Resin3116ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/resin/Resin3116ContainerTest.java @@ -1,10 +1,10 @@ package com.reajason.javaweb.integration.resin; import com.reajason.javaweb.integration.TestCasesProvider; -import com.reajason.javaweb.memshell.ShellType; +import com.reajason.javaweb.memshell.Packers; import com.reajason.javaweb.memshell.Server; import com.reajason.javaweb.memshell.ShellTool; -import com.reajason.javaweb.memshell.Packers; +import com.reajason.javaweb.memshell.ShellType; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import net.bytebuddy.jar.asm.Opcodes; @@ -17,14 +17,13 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException; import static com.reajason.javaweb.integration.ShellAssertionTool.testShellInjectAssertOk; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.params.provider.Arguments.arguments; /** * @author ReaJason @@ -44,8 +43,8 @@ public class Resin3116ContainerTest { static Stream casesProvider() { Server server = Server.Resin; - Set supportedShellTypes = Set.of(ShellType.FILTER, ShellType.LISTENER, ShellType.AGENT_FILTER_CHAIN); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); + List supportedShellTypes = List.of(ShellType.FILTER, ShellType.LISTENER, ShellType.AGENT_FILTER_CHAIN); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/resin/Resin318ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/resin/Resin318ContainerTest.java index 7ba27db7..b6d2dfd5 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/resin/Resin318ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/resin/Resin318ContainerTest.java @@ -16,7 +16,7 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; @@ -42,8 +42,8 @@ public class Resin318ContainerTest { static Stream casesProvider() { Server server = Server.Resin; - Set supportedShellTypes = Set.of(ShellType.FILTER, ShellType.LISTENER, ShellType.AGENT_FILTER_CHAIN); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); + List supportedShellTypes = List.of(ShellType.FILTER, ShellType.LISTENER, ShellType.AGENT_FILTER_CHAIN); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/resin/Resin4058ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/resin/Resin4058ContainerTest.java index 7768c66a..41e00159 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/resin/Resin4058ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/resin/Resin4058ContainerTest.java @@ -1,10 +1,10 @@ package com.reajason.javaweb.integration.resin; import com.reajason.javaweb.integration.TestCasesProvider; -import com.reajason.javaweb.memshell.ShellType; +import com.reajason.javaweb.memshell.Packers; import com.reajason.javaweb.memshell.Server; import com.reajason.javaweb.memshell.ShellTool; -import com.reajason.javaweb.memshell.Packers; +import com.reajason.javaweb.memshell.ShellType; import lombok.extern.slf4j.Slf4j; import net.bytebuddy.jar.asm.Opcodes; import org.junit.jupiter.api.AfterAll; @@ -16,14 +16,13 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException; import static com.reajason.javaweb.integration.ShellAssertionTool.testShellInjectAssertOk; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.params.provider.Arguments.arguments; /** * @author ReaJason @@ -43,8 +42,8 @@ public class Resin4058ContainerTest { static Stream casesProvider() { Server server = Server.Resin; - Set supportedShellTypes = Set.of(ShellType.FILTER, ShellType.LISTENER, ShellType.AGENT_FILTER_CHAIN); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); + List supportedShellTypes = List.of(ShellType.FILTER, ShellType.LISTENER, ShellType.AGENT_FILTER_CHAIN); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/resin/Resin4067ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/resin/Resin4067ContainerTest.java index 96d5e962..586dbc2f 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/resin/Resin4067ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/resin/Resin4067ContainerTest.java @@ -1,10 +1,10 @@ package com.reajason.javaweb.integration.resin; import com.reajason.javaweb.integration.TestCasesProvider; -import com.reajason.javaweb.memshell.ShellType; +import com.reajason.javaweb.memshell.Packers; import com.reajason.javaweb.memshell.Server; import com.reajason.javaweb.memshell.ShellTool; -import com.reajason.javaweb.memshell.Packers; +import com.reajason.javaweb.memshell.ShellType; import lombok.extern.slf4j.Slf4j; import net.bytebuddy.jar.asm.Opcodes; import org.junit.jupiter.api.AfterAll; @@ -16,14 +16,13 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException; import static com.reajason.javaweb.integration.ShellAssertionTool.testShellInjectAssertOk; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.params.provider.Arguments.arguments; /** * @author ReaJason @@ -43,8 +42,8 @@ public class Resin4067ContainerTest { static Stream casesProvider() { Server server = Server.Resin; - Set supportedShellTypes = Set.of(ShellType.FILTER, ShellType.LISTENER, ShellType.AGENT_FILTER_CHAIN); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); + List supportedShellTypes = List.of(ShellType.FILTER, ShellType.LISTENER, ShellType.AGENT_FILTER_CHAIN); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/springmvc/SpringBoot2ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/springmvc/SpringBoot2ContainerTest.java index 14ee8419..dda416d7 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/springmvc/SpringBoot2ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/springmvc/SpringBoot2ContainerTest.java @@ -17,7 +17,7 @@ import org.testcontainers.images.builder.ImageFromDockerfile; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; @@ -44,8 +44,8 @@ public class SpringBoot2ContainerTest { static Stream casesProvider() { Server server = Server.SpringWebMvc; - Set supportedShellTypes = Set.of(ShellType.SPRING_WEBMVC_INTERCEPTOR, ShellType.SPRING_WEBMVC_CONTROLLER_HANDLER, ShellType.SPRING_WEBMVC_AGENT_FRAMEWORK_SERVLET); - Set testPackers = Set.of(Packers.ScriptEngine, Packers.SpEL, Packers.Base64); + List supportedShellTypes = List.of(ShellType.SPRING_WEBMVC_INTERCEPTOR, ShellType.SPRING_WEBMVC_CONTROLLER_HANDLER, ShellType.SPRING_WEBMVC_AGENT_FRAMEWORK_SERVLET); + List testPackers = List.of(Packers.ScriptEngine, Packers.SpEL, Packers.Base64); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/springmvc/SpringBoot2WarContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/springmvc/SpringBoot2WarContainerTest.java index f66af7e9..a96fd419 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/springmvc/SpringBoot2WarContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/springmvc/SpringBoot2WarContainerTest.java @@ -1,10 +1,10 @@ package com.reajason.javaweb.integration.springmvc; import com.reajason.javaweb.integration.TestCasesProvider; -import com.reajason.javaweb.memshell.ShellType; +import com.reajason.javaweb.memshell.Packers; import com.reajason.javaweb.memshell.Server; import com.reajason.javaweb.memshell.ShellTool; -import com.reajason.javaweb.memshell.Packers; +import com.reajason.javaweb.memshell.ShellType; import lombok.extern.slf4j.Slf4j; import net.bytebuddy.jar.asm.Opcodes; import org.junit.jupiter.api.AfterAll; @@ -16,7 +16,7 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.getUrl; @@ -24,7 +24,6 @@ import static com.reajason.javaweb.integration.ContainerTool.springBoot2WarFile; import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException; import static com.reajason.javaweb.integration.ShellAssertionTool.testShellInjectAssertOk; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.params.provider.Arguments.arguments; /** * @author ReaJason @@ -43,9 +42,9 @@ public class SpringBoot2WarContainerTest { static Stream casesProvider() { Server server = Server.SpringWebMvc; - Set supportedShellTypes = Set.of(ShellType.SPRING_WEBMVC_INTERCEPTOR, + List supportedShellTypes = List.of(ShellType.SPRING_WEBMVC_INTERCEPTOR, ShellType.SPRING_WEBMVC_CONTROLLER_HANDLER); - Set testPackers = Set.of(Packers.ScriptEngine, Packers.SpEL, Packers.Base64); + List testPackers = List.of(Packers.ScriptEngine, Packers.SpEL, Packers.Base64); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/springmvc/SpringBoot3ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/springmvc/SpringBoot3ContainerTest.java index 7198fb88..c2712b0b 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/springmvc/SpringBoot3ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/springmvc/SpringBoot3ContainerTest.java @@ -1,10 +1,10 @@ package com.reajason.javaweb.integration.springmvc; import com.reajason.javaweb.integration.TestCasesProvider; -import com.reajason.javaweb.memshell.ShellType; +import com.reajason.javaweb.memshell.Packers; import com.reajason.javaweb.memshell.Server; import com.reajason.javaweb.memshell.ShellTool; -import com.reajason.javaweb.memshell.Packers; +import com.reajason.javaweb.memshell.ShellType; import lombok.extern.slf4j.Slf4j; import net.bytebuddy.jar.asm.Opcodes; import org.junit.jupiter.api.AfterAll; @@ -17,14 +17,13 @@ import org.testcontainers.images.builder.ImageFromDockerfile; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException; import static com.reajason.javaweb.integration.ShellAssertionTool.testShellInjectAssertOk; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.params.provider.Arguments.arguments; /** * @author ReaJason @@ -45,9 +44,9 @@ public class SpringBoot3ContainerTest { static Stream casesProvider() { Server server = Server.SpringWebMvc; - Set supportedShellTypes = Set.of(ShellType.SPRING_WEBMVC_JAKARTA_INTERCEPTOR, ShellType.SPRING_WEBMVC_JAKARTA_CONTROLLER_HANDLER, ShellType.SPRING_WEBMVC_AGENT_FRAMEWORK_SERVLET); - Set testPackers = Set.of(Packers.Base64); - return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers, null, Set.of(ShellTool.AntSword)); + List supportedShellTypes = List.of(ShellType.SPRING_WEBMVC_JAKARTA_INTERCEPTOR, ShellType.SPRING_WEBMVC_JAKARTA_CONTROLLER_HANDLER, ShellType.SPRING_WEBMVC_AGENT_FRAMEWORK_SERVLET); + List testPackers = List.of(Packers.Base64); + return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers, null, List.of(ShellTool.AntSword)); } @AfterAll diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/springwebflux/SpringBoot2WebFluxContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/springwebflux/SpringBoot2WebFluxContainerTest.java index 88a30798..52651cc5 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/springwebflux/SpringBoot2WebFluxContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/springwebflux/SpringBoot2WebFluxContainerTest.java @@ -1,10 +1,10 @@ package com.reajason.javaweb.integration.springwebflux; import com.reajason.javaweb.integration.TestCasesProvider; -import com.reajason.javaweb.memshell.ShellType; +import com.reajason.javaweb.memshell.Packers; import com.reajason.javaweb.memshell.Server; import com.reajason.javaweb.memshell.ShellTool; -import com.reajason.javaweb.memshell.Packers; +import com.reajason.javaweb.memshell.ShellType; import lombok.extern.slf4j.Slf4j; import net.bytebuddy.jar.asm.Opcodes; import org.junit.jupiter.api.AfterAll; @@ -17,14 +17,13 @@ import org.testcontainers.images.builder.ImageFromDockerfile; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.springBoot2WebfluxDockerfile; import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException; import static com.reajason.javaweb.integration.ShellAssertionTool.testShellInjectAssertOk; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.params.provider.Arguments.arguments; /** * @author ReaJason @@ -43,8 +42,8 @@ public class SpringBoot2WebFluxContainerTest { static Stream casesProvider() { Server server = Server.SpringWebFlux; - Set supportedShellTypes = Set.of(ShellType.SPRING_WEBFLUX_WEB_FILTER, ShellType.SPRING_WEBFLUX_HANDLER_METHOD, ShellType.NETTY_HANDLER); - Set testPackers = Set.of(Packers.Base64); + List supportedShellTypes = List.of(ShellType.SPRING_WEBFLUX_WEB_FILTER, ShellType.SPRING_WEBFLUX_HANDLER_METHOD, ShellType.NETTY_HANDLER); + List testPackers = List.of(Packers.Base64); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/springwebflux/SpringBoot3WebFluxContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/springwebflux/SpringBoot3WebFluxContainerTest.java index d628edb3..9800e418 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/springwebflux/SpringBoot3WebFluxContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/springwebflux/SpringBoot3WebFluxContainerTest.java @@ -1,10 +1,10 @@ package com.reajason.javaweb.integration.springwebflux; import com.reajason.javaweb.integration.TestCasesProvider; -import com.reajason.javaweb.memshell.ShellType; +import com.reajason.javaweb.memshell.Packers; import com.reajason.javaweb.memshell.Server; import com.reajason.javaweb.memshell.ShellTool; -import com.reajason.javaweb.memshell.Packers; +import com.reajason.javaweb.memshell.ShellType; import lombok.extern.slf4j.Slf4j; import net.bytebuddy.jar.asm.Opcodes; import org.junit.jupiter.api.AfterAll; @@ -17,14 +17,13 @@ import org.testcontainers.images.builder.ImageFromDockerfile; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.springBoot3WebfluxDockerfile; import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException; import static com.reajason.javaweb.integration.ShellAssertionTool.testShellInjectAssertOk; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.params.provider.Arguments.arguments; /** * @author ReaJason @@ -43,8 +42,8 @@ public class SpringBoot3WebFluxContainerTest { static Stream casesProvider() { Server server = Server.SpringWebFlux; - Set supportedShellTypes = Set.of(ShellType.SPRING_WEBFLUX_WEB_FILTER, ShellType.SPRING_WEBFLUX_HANDLER_METHOD, ShellType.NETTY_HANDLER); - Set testPackers = Set.of(Packers.Base64); + List supportedShellTypes = List.of(ShellType.SPRING_WEBFLUX_WEB_FILTER, ShellType.SPRING_WEBFLUX_HANDLER_METHOD, ShellType.NETTY_HANDLER); + List testPackers = List.of(Packers.Base64); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat10ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat10ContainerTest.java index 9d27edc0..ae00a23b 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat10ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat10ContainerTest.java @@ -1,10 +1,10 @@ package com.reajason.javaweb.integration.tomcat; import com.reajason.javaweb.integration.TestCasesProvider; -import com.reajason.javaweb.memshell.ShellType; +import com.reajason.javaweb.memshell.Packers; import com.reajason.javaweb.memshell.Server; import com.reajason.javaweb.memshell.ShellTool; -import com.reajason.javaweb.memshell.Packers; +import com.reajason.javaweb.memshell.ShellType; import lombok.extern.slf4j.Slf4j; import net.bytebuddy.jar.asm.Opcodes; import org.junit.jupiter.api.AfterAll; @@ -16,14 +16,13 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException; import static com.reajason.javaweb.integration.ShellAssertionTool.testShellInjectAssertOk; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.params.provider.Arguments.arguments; /** * @author ReaJason @@ -43,10 +42,10 @@ public class Tomcat10ContainerTest { static Stream casesProvider() { Server server = Server.Tomcat; - Set supportedShellTypes = Set.of(ShellType.JAKARTA_FILTER, ShellType.JAKARTA_LISTENER, ShellType.JAKARTA_VALVE, + List supportedShellTypes = List.of(ShellType.JAKARTA_FILTER, ShellType.JAKARTA_LISTENER, ShellType.JAKARTA_VALVE, ShellType.AGENT_FILTER_CHAIN, ShellType.CATALINA_AGENT_CONTEXT_VALVE); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); - return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers, null, Set.of(ShellTool.AntSword)); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); + return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers, null, List.of(ShellTool.AntSword)); } @AfterAll diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat11ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat11ContainerTest.java index 8cb604c4..ad40dfb2 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat11ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat11ContainerTest.java @@ -16,7 +16,7 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; @@ -43,10 +43,10 @@ public class Tomcat11ContainerTest { static Stream casesProvider() { Server server = Server.Tomcat; - Set supportedShellTypes = Set.of(ShellType.JAKARTA_FILTER, ShellType.JAKARTA_LISTENER, ShellType.JAKARTA_VALVE, + List supportedShellTypes = List.of(ShellType.JAKARTA_FILTER, ShellType.JAKARTA_LISTENER, ShellType.JAKARTA_VALVE, ShellType.AGENT_FILTER_CHAIN, ShellType.CATALINA_AGENT_CONTEXT_VALVE); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX); - return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers, null, Set.of(ShellTool.AntSword)); + List testPackers = List.of(Packers.JSP, Packers.JSPX); + return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers, null, List.of(ShellTool.AntSword)); } @AfterAll diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat11JRE21ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat11JRE21ContainerTest.java index a31c8edf..d14af14b 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat11JRE21ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat11JRE21ContainerTest.java @@ -16,7 +16,7 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; @@ -43,10 +43,10 @@ public class Tomcat11JRE21ContainerTest { static Stream casesProvider() { Server server = Server.Tomcat; - Set supportedShellTypes = Set.of(ShellType.JAKARTA_FILTER, ShellType.JAKARTA_LISTENER, ShellType.JAKARTA_VALVE, + List supportedShellTypes = List.of(ShellType.JAKARTA_FILTER, ShellType.JAKARTA_LISTENER, ShellType.JAKARTA_VALVE, ShellType.AGENT_FILTER_CHAIN, ShellType.CATALINA_AGENT_CONTEXT_VALVE); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX); - return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers, null, Set.of(ShellTool.AntSword)); + List testPackers = List.of(Packers.JSP, Packers.JSPX); + return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers, null, List.of(ShellTool.AntSword)); } @AfterAll diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat5ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat5ContainerTest.java index 7da10975..49059b36 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat5ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat5ContainerTest.java @@ -1,10 +1,10 @@ package com.reajason.javaweb.integration.tomcat; import com.reajason.javaweb.integration.TestCasesProvider; -import com.reajason.javaweb.memshell.ShellType; +import com.reajason.javaweb.memshell.Packers; import com.reajason.javaweb.memshell.Server; import com.reajason.javaweb.memshell.ShellTool; -import com.reajason.javaweb.memshell.Packers; +import com.reajason.javaweb.memshell.ShellType; import lombok.extern.slf4j.Slf4j; import net.bytebuddy.jar.asm.Opcodes; import org.junit.jupiter.api.AfterAll; @@ -16,14 +16,13 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException; import static com.reajason.javaweb.integration.ShellAssertionTool.testShellInjectAssertOk; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.params.provider.Arguments.arguments; /** * @author ReaJason @@ -43,8 +42,8 @@ public class Tomcat5ContainerTest { static Stream casesProvider() { Server server = Server.Tomcat; - Set supportedShellTypes = Set.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); + List supportedShellTypes = List.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat6ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat6ContainerTest.java index 1b51d7f4..57386c31 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat6ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat6ContainerTest.java @@ -1,10 +1,10 @@ package com.reajason.javaweb.integration.tomcat; import com.reajason.javaweb.integration.TestCasesProvider; -import com.reajason.javaweb.memshell.ShellType; +import com.reajason.javaweb.memshell.Packers; import com.reajason.javaweb.memshell.Server; import com.reajason.javaweb.memshell.ShellTool; -import com.reajason.javaweb.memshell.Packers; +import com.reajason.javaweb.memshell.ShellType; import lombok.extern.slf4j.Slf4j; import net.bytebuddy.jar.asm.Opcodes; import org.junit.jupiter.api.AfterAll; @@ -16,15 +16,13 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; -import static com.reajason.javaweb.integration.ContainerTool.tomcatPid; import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException; import static com.reajason.javaweb.integration.ShellAssertionTool.testShellInjectAssertOk; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.params.provider.Arguments.arguments; /** * @author ReaJason @@ -44,9 +42,9 @@ public class Tomcat6ContainerTest { static Stream casesProvider() { Server server = Server.Tomcat; - Set supportedShellTypes = Set.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE, + List supportedShellTypes = List.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE, ShellType.AGENT_FILTER_CHAIN, ShellType.CATALINA_AGENT_CONTEXT_VALVE); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat7ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat7ContainerTest.java index 8d8413ee..4b557ea2 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat7ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat7ContainerTest.java @@ -1,10 +1,10 @@ package com.reajason.javaweb.integration.tomcat; import com.reajason.javaweb.integration.TestCasesProvider; -import com.reajason.javaweb.memshell.ShellType; +import com.reajason.javaweb.memshell.Packers; import com.reajason.javaweb.memshell.Server; import com.reajason.javaweb.memshell.ShellTool; -import com.reajason.javaweb.memshell.Packers; +import com.reajason.javaweb.memshell.ShellType; import lombok.extern.slf4j.Slf4j; import net.bytebuddy.jar.asm.Opcodes; import org.junit.jupiter.api.AfterAll; @@ -16,15 +16,13 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; -import static com.reajason.javaweb.integration.ContainerTool.tomcatPid; import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException; import static com.reajason.javaweb.integration.ShellAssertionTool.testShellInjectAssertOk; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.params.provider.Arguments.arguments; /** * @author ReaJason @@ -44,9 +42,9 @@ public class Tomcat7ContainerTest { static Stream casesProvider() { Server server = Server.Tomcat; - Set supportedShellTypes = Set.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE, + List supportedShellTypes = List.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE, ShellType.AGENT_FILTER_CHAIN, ShellType.CATALINA_AGENT_CONTEXT_VALVE); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat8ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat8ContainerTest.java index 89513773..ff6a76ed 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat8ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat8ContainerTest.java @@ -16,7 +16,7 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; @@ -43,9 +43,9 @@ public class Tomcat8ContainerTest { static Stream casesProvider() { Server server = Server.Tomcat; - Set supportedShellTypes = Set.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE, ShellType.WEBSOCKET, + List supportedShellTypes = List.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE, ShellType.WEBSOCKET, ShellType.AGENT_FILTER_CHAIN, ShellType.CATALINA_AGENT_CONTEXT_VALVE); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat8DeserializeContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat8DeserializeContainerTest.java index 1130b664..9a799f64 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat8DeserializeContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat8DeserializeContainerTest.java @@ -1,9 +1,9 @@ package com.reajason.javaweb.integration.tomcat; -import com.reajason.javaweb.memshell.ShellType; +import com.reajason.javaweb.memshell.Packers; import com.reajason.javaweb.memshell.Server; import com.reajason.javaweb.memshell.ShellTool; -import com.reajason.javaweb.memshell.Packers; +import com.reajason.javaweb.memshell.ShellType; import lombok.extern.slf4j.Slf4j; import net.bytebuddy.jar.asm.Opcodes; import org.junit.jupiter.api.AfterAll; diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat8ExpressionContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat8ExpressionContainerTest.java index 7e8042af..b6ecdc16 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat8ExpressionContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat8ExpressionContainerTest.java @@ -1,9 +1,9 @@ package com.reajason.javaweb.integration.tomcat; -import com.reajason.javaweb.memshell.ShellType; +import com.reajason.javaweb.memshell.Packers; import com.reajason.javaweb.memshell.Server; import com.reajason.javaweb.memshell.ShellTool; -import com.reajason.javaweb.memshell.Packers; +import com.reajason.javaweb.memshell.ShellType; import lombok.extern.slf4j.Slf4j; import net.bytebuddy.jar.asm.Opcodes; import org.junit.jupiter.api.AfterAll; diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat9ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat9ContainerTest.java index bab3aad7..57335ac2 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat9ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/tomcat/Tomcat9ContainerTest.java @@ -1,10 +1,10 @@ package com.reajason.javaweb.integration.tomcat; import com.reajason.javaweb.integration.TestCasesProvider; -import com.reajason.javaweb.memshell.ShellType; +import com.reajason.javaweb.memshell.Packers; import com.reajason.javaweb.memshell.Server; import com.reajason.javaweb.memshell.ShellTool; -import com.reajason.javaweb.memshell.Packers; +import com.reajason.javaweb.memshell.ShellType; import lombok.extern.slf4j.Slf4j; import net.bytebuddy.jar.asm.Opcodes; import org.junit.jupiter.api.AfterAll; @@ -16,14 +16,13 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException; import static com.reajason.javaweb.integration.ShellAssertionTool.testShellInjectAssertOk; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.params.provider.Arguments.arguments; /** * @author ReaJason @@ -43,9 +42,9 @@ public class Tomcat9ContainerTest { static Stream casesProvider() { Server server = Server.Tomcat; - Set supportedShellTypes = Set.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE, + List supportedShellTypes = List.of(ShellType.FILTER, ShellType.LISTENER, ShellType.VALVE, ShellType.AGENT_FILTER_CHAIN, ShellType.CATALINA_AGENT_CONTEXT_VALVE); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.JavaDeserialize); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/weblogic/WebLogic1036ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/weblogic/WebLogic1036ContainerTest.java index 16b23c84..c20a50d0 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/weblogic/WebLogic1036ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/weblogic/WebLogic1036ContainerTest.java @@ -17,7 +17,7 @@ import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; import org.testcontainers.shaded.org.apache.commons.lang3.tuple.Triple; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; @@ -41,9 +41,9 @@ public class WebLogic1036ContainerTest { static Stream casesProvider() { Server server = Server.WebLogic; - Set supportedShellTypes = Set.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.WEBLOGIC_AGENT_SERVLET_CONTEXT); - Set testPackers = Set.of(Packers.Base64); - Set> unSupportedCases = Set.of( + List supportedShellTypes = List.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.WEBLOGIC_AGENT_SERVLET_CONTEXT); + List testPackers = List.of(Packers.Base64); + List> unSupportedCases = List.of( Triple.of(ShellType.SERVLET, ShellTool.Behinder, Packers.Base64), // java.net.SocketTimeoutException Triple.of(ShellType.FILTER, ShellTool.Behinder, Packers.Base64) // java.net.SocketTimeoutException ); diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/weblogic/WebLogic12214ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/weblogic/WebLogic12214ContainerTest.java index d9dd8a71..937e92f6 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/weblogic/WebLogic12214ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/weblogic/WebLogic12214ContainerTest.java @@ -16,7 +16,7 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; @@ -42,8 +42,8 @@ public class WebLogic12214ContainerTest { static Stream casesProvider() { Server server = Server.WebLogic; - Set supportedShellTypes = Set.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.WEBLOGIC_AGENT_SERVLET_CONTEXT); - Set testPackers = Set.of(Packers.Base64); + List supportedShellTypes = List.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.WEBLOGIC_AGENT_SERVLET_CONTEXT); + List testPackers = List.of(Packers.Base64); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/weblogic/WebLogic14110ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/weblogic/WebLogic14110ContainerTest.java index 9d533605..b58d251f 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/weblogic/WebLogic14110ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/weblogic/WebLogic14110ContainerTest.java @@ -16,7 +16,7 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; @@ -42,8 +42,8 @@ public class WebLogic14110ContainerTest { static Stream casesProvider() { Server server = Server.WebLogic; - Set supportedShellTypes = Set.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.WEBLOGIC_AGENT_SERVLET_CONTEXT); - Set testPackers = Set.of(Packers.Base64); + List supportedShellTypes = List.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.WEBLOGIC_AGENT_SERVLET_CONTEXT); + List testPackers = List.of(Packers.Base64); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/websphere/WebSphere855ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/websphere/WebSphere855ContainerTest.java index 0d8b3b17..9b50c719 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/websphere/WebSphere855ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/websphere/WebSphere855ContainerTest.java @@ -1,10 +1,10 @@ package com.reajason.javaweb.integration.websphere; import com.reajason.javaweb.integration.TestCasesProvider; -import com.reajason.javaweb.memshell.ShellType; +import com.reajason.javaweb.memshell.Packers; import com.reajason.javaweb.memshell.Server; import com.reajason.javaweb.memshell.ShellTool; -import com.reajason.javaweb.memshell.Packers; +import com.reajason.javaweb.memshell.ShellType; import lombok.extern.slf4j.Slf4j; import net.bytebuddy.jar.asm.Opcodes; import org.junit.jupiter.api.AfterAll; @@ -18,14 +18,13 @@ import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; import java.time.Duration; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException; import static com.reajason.javaweb.integration.ShellAssertionTool.testShellInjectAssertOk; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.params.provider.Arguments.arguments; /** * @author ReaJason @@ -46,8 +45,8 @@ public class WebSphere855ContainerTest { static Stream casesProvider() { Server server = Server.WebSphere; - Set supportedShellTypes = Set.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.WAS_AGENT_FILTER_MANAGER); - Set testPackers = Set.of(Packers.JSP); + List supportedShellTypes = List.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.WAS_AGENT_FILTER_MANAGER); + List testPackers = List.of(Packers.JSP); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/websphere/WebSphere905ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/websphere/WebSphere905ContainerTest.java index b8a0adf9..d3d8ff53 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/websphere/WebSphere905ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/websphere/WebSphere905ContainerTest.java @@ -1,10 +1,10 @@ package com.reajason.javaweb.integration.websphere; import com.reajason.javaweb.integration.TestCasesProvider; -import com.reajason.javaweb.memshell.ShellType; +import com.reajason.javaweb.memshell.Packers; import com.reajason.javaweb.memshell.Server; import com.reajason.javaweb.memshell.ShellTool; -import com.reajason.javaweb.memshell.Packers; +import com.reajason.javaweb.memshell.ShellType; import lombok.extern.slf4j.Slf4j; import net.bytebuddy.jar.asm.Opcodes; import org.junit.jupiter.api.AfterAll; @@ -18,14 +18,13 @@ import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; import java.time.Duration; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException; import static com.reajason.javaweb.integration.ShellAssertionTool.testShellInjectAssertOk; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.params.provider.Arguments.arguments; /** * @author ReaJason @@ -46,8 +45,8 @@ public class WebSphere905ContainerTest { static Stream casesProvider() { Server server = Server.WebSphere; - Set supportedShellTypes = Set.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.WAS_AGENT_FILTER_MANAGER); - Set testPackers = Set.of(Packers.JSP); + List supportedShellTypes = List.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.WAS_AGENT_FILTER_MANAGER); + List testPackers = List.of(Packers.JSP); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/websphere7/WebSphere700ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/websphere7/WebSphere700ContainerTest.java index 1058db86..38885241 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/websphere7/WebSphere700ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/websphere7/WebSphere700ContainerTest.java @@ -18,7 +18,7 @@ import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; import java.time.Duration; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; @@ -45,8 +45,8 @@ public class WebSphere700ContainerTest { static Stream casesProvider() { Server server = Server.WebSphere; - Set supportedShellTypes = Set.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.WAS_AGENT_FILTER_MANAGER); - Set testPackers = Set.of(Packers.JSP); + List supportedShellTypes = List.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.WAS_AGENT_FILTER_MANAGER); + List testPackers = List.of(Packers.JSP); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/wildfly/Wildfly18ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/wildfly/Wildfly18ContainerTest.java index 93f887d0..b774c1d6 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/wildfly/Wildfly18ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/wildfly/Wildfly18ContainerTest.java @@ -16,7 +16,7 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; @@ -43,8 +43,8 @@ public class Wildfly18ContainerTest { static Stream casesProvider() { Server server = Server.Undertow; - Set supportedShellTypes = Set.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.UNDERTOW_AGENT_SERVLET_HANDLER); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX); + List supportedShellTypes = List.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.UNDERTOW_AGENT_SERVLET_HANDLER); + List testPackers = List.of(Packers.JSP, Packers.JSPX); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/wildfly/Wildfly23ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/wildfly/Wildfly23ContainerTest.java index 989b30ae..5e77eef5 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/wildfly/Wildfly23ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/wildfly/Wildfly23ContainerTest.java @@ -1,10 +1,10 @@ package com.reajason.javaweb.integration.wildfly; import com.reajason.javaweb.integration.TestCasesProvider; -import com.reajason.javaweb.memshell.ShellType; +import com.reajason.javaweb.memshell.Packers; import com.reajason.javaweb.memshell.Server; import com.reajason.javaweb.memshell.ShellTool; -import com.reajason.javaweb.memshell.Packers; +import com.reajason.javaweb.memshell.ShellType; import lombok.extern.slf4j.Slf4j; import net.bytebuddy.jar.asm.Opcodes; import org.junit.jupiter.api.AfterAll; @@ -16,14 +16,13 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException; import static com.reajason.javaweb.integration.ShellAssertionTool.testShellInjectAssertOk; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.params.provider.Arguments.arguments; /** * @author ReaJason @@ -44,8 +43,8 @@ public class Wildfly23ContainerTest { static Stream casesProvider() { Server server = Server.Undertow; - Set supportedShellTypes = Set.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.UNDERTOW_AGENT_SERVLET_HANDLER); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX); + List supportedShellTypes = List.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.UNDERTOW_AGENT_SERVLET_HANDLER); + List testPackers = List.of(Packers.JSP, Packers.JSPX); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/wildfly/Wildfly30ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/wildfly/Wildfly30ContainerTest.java index a7727d80..8ee9658b 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/wildfly/Wildfly30ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/wildfly/Wildfly30ContainerTest.java @@ -16,7 +16,7 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; @@ -43,10 +43,10 @@ public class Wildfly30ContainerTest { static Stream casesProvider() { Server server = Server.Undertow; - Set supportedShellTypes = Set.of(ShellType.JAKARTA_SERVLET, ShellType.JAKARTA_FILTER, ShellType.JAKARTA_LISTENER, ShellType.UNDERTOW_AGENT_SERVLET_HANDLER); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX); + List supportedShellTypes = List.of(ShellType.JAKARTA_SERVLET, ShellType.JAKARTA_FILTER, ShellType.JAKARTA_LISTENER, ShellType.UNDERTOW_AGENT_SERVLET_HANDLER); + List testPackers = List.of(Packers.JSP, Packers.JSPX); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers, - null, Set.of(ShellTool.AntSword) // AntSword not support jakarta + null, List.of(ShellTool.AntSword) // AntSword not support jakarta ); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/wildfly/Wildfly9ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/wildfly/Wildfly9ContainerTest.java index d2d20276..9bfff8ab 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/wildfly/Wildfly9ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/wildfly/Wildfly9ContainerTest.java @@ -1,10 +1,10 @@ package com.reajason.javaweb.integration.wildfly; import com.reajason.javaweb.integration.TestCasesProvider; -import com.reajason.javaweb.memshell.ShellType; +import com.reajason.javaweb.memshell.Packers; import com.reajason.javaweb.memshell.Server; import com.reajason.javaweb.memshell.ShellTool; -import com.reajason.javaweb.memshell.Packers; +import com.reajason.javaweb.memshell.ShellType; import lombok.extern.slf4j.Slf4j; import net.bytebuddy.jar.asm.Opcodes; import org.junit.jupiter.api.AfterAll; @@ -17,14 +17,13 @@ import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; import org.testcontainers.shaded.org.apache.commons.lang3.tuple.Triple; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.ContainerTool.*; import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException; import static com.reajason.javaweb.integration.ShellAssertionTool.testShellInjectAssertOk; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.params.provider.Arguments.arguments; /** * Wildfly - DockerHub @@ -48,9 +47,9 @@ public class Wildfly9ContainerTest { static Stream casesProvider() { Server server = Server.Undertow; - Set supportedShellTypes = Set.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.UNDERTOW_AGENT_SERVLET_HANDLER); - Set testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.ScriptEngine); - Set> unSupportedCases = Set.of( + List supportedShellTypes = List.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.UNDERTOW_AGENT_SERVLET_HANDLER); + List testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.ScriptEngine); + List> unSupportedCases = List.of( Triple.of(ShellType.UNDERTOW_AGENT_SERVLET_HANDLER, ShellTool.AntSword, Packers.AgentJar) // Request ClassNotFound in module ); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers, unSupportedCases); diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/xxljob/XxlJob220ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/xxljob/XxlJob220ContainerTest.java index 5f813bef..f2514cde 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/xxljob/XxlJob220ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/xxljob/XxlJob220ContainerTest.java @@ -16,7 +16,7 @@ import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; import java.io.File; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException; @@ -40,8 +40,8 @@ public class XxlJob220ContainerTest { static Stream casesProvider() { Server server = Server.XXLJOB; - Set supportedShellTypes = Set.of(ShellType.NETTY_HANDLER); - Set testPackers = Set.of(Packers.XxlJob); + List supportedShellTypes = List.of(ShellType.NETTY_HANDLER); + List testPackers = List.of(Packers.XxlJob); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); } diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/xxljob/XxlJob230ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/xxljob/XxlJob230ContainerTest.java index a9d0f540..1680a273 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/xxljob/XxlJob230ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/xxljob/XxlJob230ContainerTest.java @@ -1,11 +1,10 @@ package com.reajason.javaweb.integration.xxljob; import com.reajason.javaweb.integration.TestCasesProvider; -import com.reajason.javaweb.memshell.ShellType; -import com.reajason.javaweb.memshell.server.XxlJobShell; +import com.reajason.javaweb.memshell.Packers; import com.reajason.javaweb.memshell.Server; import com.reajason.javaweb.memshell.ShellTool; -import com.reajason.javaweb.memshell.Packers; +import com.reajason.javaweb.memshell.ShellType; import lombok.extern.slf4j.Slf4j; import net.bytebuddy.jar.asm.Opcodes; import org.junit.jupiter.api.AfterAll; @@ -17,13 +16,12 @@ import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; import java.io.File; -import java.util.Set; +import java.util.List; import java.util.stream.Stream; import static com.reajason.javaweb.integration.DoesNotContainExceptionMatcher.doesNotContainException; import static com.reajason.javaweb.integration.ShellAssertionTool.testShellInjectAssertOk; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.params.provider.Arguments.arguments; /** * @author ReaJason @@ -42,8 +40,8 @@ public class XxlJob230ContainerTest { static Stream casesProvider() { Server server = Server.XXLJOB; - Set supportedShellTypes = Set.of(ShellType.NETTY_HANDLER); - Set testPackers = Set.of(Packers.XxlJob); + List supportedShellTypes = List.of(ShellType.NETTY_HANDLER); + List testPackers = List.of(Packers.XxlJob); return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers); }