mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-25 00:11:52 +08:00
refactor: supported unified test cases provider
This commit is contained in:
+6
-22
@@ -1,5 +1,6 @@
|
||||
package com.reajason.javaweb.integration.websphere;
|
||||
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
@@ -17,6 +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.stream.Stream;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
@@ -43,28 +45,10 @@ public class WebSphere855ContainerTest {
|
||||
.withPrivilegedMode(true);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
return Stream.of(
|
||||
arguments(imageName, ShellType.SERVLET, ShellTool.Behinder, Packers.JSP),
|
||||
arguments(imageName, ShellType.SERVLET, ShellTool.Godzilla, Packers.JSP),
|
||||
arguments(imageName, ShellType.SERVLET, ShellTool.Command, Packers.JSP),
|
||||
arguments(imageName, ShellType.SERVLET, ShellTool.Suo5, Packers.JSP),
|
||||
arguments(imageName, ShellType.SERVLET, ShellTool.AntSword, Packers.JSP),
|
||||
arguments(imageName, ShellType.FILTER, ShellTool.Behinder, Packers.JSP),
|
||||
arguments(imageName, ShellType.FILTER, ShellTool.Godzilla, Packers.JSP),
|
||||
arguments(imageName, ShellType.FILTER, ShellTool.Command, Packers.JSP),
|
||||
arguments(imageName, ShellType.FILTER, ShellTool.Suo5, Packers.JSP),
|
||||
arguments(imageName, ShellType.FILTER, ShellTool.AntSword, Packers.JSP),
|
||||
arguments(imageName, ShellType.LISTENER, ShellTool.Behinder, Packers.JSP),
|
||||
arguments(imageName, ShellType.LISTENER, ShellTool.Godzilla, Packers.JSP),
|
||||
arguments(imageName, ShellType.LISTENER, ShellTool.Command, Packers.JSP),
|
||||
arguments(imageName, ShellType.LISTENER, ShellTool.Suo5, Packers.JSP),
|
||||
arguments(imageName, ShellType.LISTENER, ShellTool.AntSword, Packers.JSP),
|
||||
arguments(imageName, ShellType.WAS_AGENT_FILTER_MANAGER, ShellTool.AntSword, Packers.AgentJar),
|
||||
arguments(imageName, ShellType.WAS_AGENT_FILTER_MANAGER, ShellTool.Command, Packers.AgentJar),
|
||||
arguments(imageName, ShellType.WAS_AGENT_FILTER_MANAGER, ShellTool.Behinder, Packers.AgentJar),
|
||||
arguments(imageName, ShellType.WAS_AGENT_FILTER_MANAGER, ShellTool.Godzilla, Packers.AgentJar)
|
||||
|
||||
);
|
||||
Server server = Server.WebSphere;
|
||||
Set<String> supportedShellTypes = Set.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.WAS_AGENT_FILTER_MANAGER);
|
||||
Set<Packers> testPackers = Set.of(Packers.JSP);
|
||||
return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers);
|
||||
}
|
||||
|
||||
@AfterAll
|
||||
|
||||
+6
-21
@@ -1,5 +1,6 @@
|
||||
package com.reajason.javaweb.integration.websphere;
|
||||
|
||||
import com.reajason.javaweb.integration.TestCasesProvider;
|
||||
import com.reajason.javaweb.memshell.ShellType;
|
||||
import com.reajason.javaweb.memshell.Server;
|
||||
import com.reajason.javaweb.memshell.ShellTool;
|
||||
@@ -17,6 +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.stream.Stream;
|
||||
|
||||
import static com.reajason.javaweb.integration.ContainerTool.*;
|
||||
@@ -43,27 +45,10 @@ public class WebSphere905ContainerTest {
|
||||
.withPrivilegedMode(true);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
return Stream.of(
|
||||
arguments(imageName, ShellType.SERVLET, ShellTool.Behinder, Packers.JSP),
|
||||
arguments(imageName, ShellType.SERVLET, ShellTool.Godzilla, Packers.JSP),
|
||||
arguments(imageName, ShellType.SERVLET, ShellTool.Command, Packers.JSP),
|
||||
arguments(imageName, ShellType.SERVLET, ShellTool.Suo5, Packers.JSP),
|
||||
arguments(imageName, ShellType.SERVLET, ShellTool.AntSword, Packers.JSP),
|
||||
arguments(imageName, ShellType.FILTER, ShellTool.Behinder, Packers.JSP),
|
||||
arguments(imageName, ShellType.FILTER, ShellTool.Godzilla, Packers.JSP),
|
||||
arguments(imageName, ShellType.FILTER, ShellTool.Command, Packers.JSP),
|
||||
arguments(imageName, ShellType.FILTER, ShellTool.Suo5, Packers.JSP),
|
||||
arguments(imageName, ShellType.FILTER, ShellTool.AntSword, Packers.JSP),
|
||||
arguments(imageName, ShellType.LISTENER, ShellTool.Behinder, Packers.JSP),
|
||||
arguments(imageName, ShellType.LISTENER, ShellTool.Godzilla, Packers.JSP),
|
||||
arguments(imageName, ShellType.LISTENER, ShellTool.Command, Packers.JSP),
|
||||
arguments(imageName, ShellType.LISTENER, ShellTool.Suo5, Packers.JSP),
|
||||
arguments(imageName, ShellType.LISTENER, ShellTool.AntSword, Packers.JSP),
|
||||
arguments(imageName, ShellType.WAS_AGENT_FILTER_MANAGER, ShellTool.AntSword, Packers.AgentJar),
|
||||
arguments(imageName, ShellType.WAS_AGENT_FILTER_MANAGER, ShellTool.Command, Packers.AgentJar),
|
||||
arguments(imageName, ShellType.WAS_AGENT_FILTER_MANAGER, ShellTool.Behinder, Packers.AgentJar),
|
||||
arguments(imageName, ShellType.WAS_AGENT_FILTER_MANAGER, ShellTool.Godzilla, Packers.AgentJar)
|
||||
);
|
||||
Server server = Server.WebSphere;
|
||||
Set<String> supportedShellTypes = Set.of(ShellType.SERVLET, ShellType.FILTER, ShellType.LISTENER, ShellType.WAS_AGENT_FILTER_MANAGER);
|
||||
Set<Packers> testPackers = Set.of(Packers.JSP);
|
||||
return TestCasesProvider.getTestCases(imageName, server, supportedShellTypes, testPackers);
|
||||
}
|
||||
|
||||
@AfterAll
|
||||
|
||||
Reference in New Issue
Block a user