mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-24 07:51:52 +08:00
test: test order list is important
This commit is contained in:
+3
-3
@@ -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<Arguments> casesProvider() {
|
||||
Server server = Server.Undertow;
|
||||
Set<String> supportedShellTypes = Set.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.UNDERTOW_AGENT_SERVLET_HANDLER);
|
||||
Set<Packers> testPackers = Set.of(Packers.JSP, Packers.JSPX);
|
||||
List<String> supportedShellTypes = List.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.UNDERTOW_AGENT_SERVLET_HANDLER);
|
||||
List<Packers> testPackers = List.of(Packers.JSP, Packers.JSPX);
|
||||
return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers);
|
||||
}
|
||||
|
||||
|
||||
+5
-6
@@ -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<Arguments> casesProvider() {
|
||||
Server server = Server.Undertow;
|
||||
Set<String> supportedShellTypes = Set.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.UNDERTOW_AGENT_SERVLET_HANDLER);
|
||||
Set<Packers> testPackers = Set.of(Packers.JSP, Packers.JSPX);
|
||||
List<String> supportedShellTypes = List.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.UNDERTOW_AGENT_SERVLET_HANDLER);
|
||||
List<Packers> testPackers = List.of(Packers.JSP, Packers.JSPX);
|
||||
return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers);
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -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<Arguments> casesProvider() {
|
||||
Server server = Server.Undertow;
|
||||
Set<String> supportedShellTypes = Set.of(ShellType.JAKARTA_SERVLET, ShellType.JAKARTA_FILTER, ShellType.JAKARTA_LISTENER, ShellType.UNDERTOW_AGENT_SERVLET_HANDLER);
|
||||
Set<Packers> testPackers = Set.of(Packers.JSP, Packers.JSPX);
|
||||
List<String> supportedShellTypes = List.of(ShellType.JAKARTA_SERVLET, ShellType.JAKARTA_FILTER, ShellType.JAKARTA_LISTENER, ShellType.UNDERTOW_AGENT_SERVLET_HANDLER);
|
||||
List<Packers> 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
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+6
-7
@@ -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;
|
||||
|
||||
/**
|
||||
* <a href="https://hub.docker.com/r/jboss/wildfly/tags">Wildfly - DockerHub</a>
|
||||
@@ -48,9 +47,9 @@ public class Wildfly9ContainerTest {
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
Server server = Server.Undertow;
|
||||
Set<String> supportedShellTypes = Set.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.UNDERTOW_AGENT_SERVLET_HANDLER);
|
||||
Set<Packers> testPackers = Set.of(Packers.JSP, Packers.JSPX, Packers.ScriptEngine);
|
||||
Set<Triple<String, ShellTool, Packers>> unSupportedCases = Set.of(
|
||||
List<String> supportedShellTypes = List.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.UNDERTOW_AGENT_SERVLET_HANDLER);
|
||||
List<Packers> testPackers = List.of(Packers.JSP, Packers.JSPX, Packers.ScriptEngine);
|
||||
List<Triple<String, ShellTool, Packers>> 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);
|
||||
|
||||
Reference in New Issue
Block a user