mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-21 22:50:42 +08:00
test: add wildfly 38/41 case
This commit is contained in:
+59
@@ -0,0 +1,59 @@
|
|||||||
|
package com.reajason.javaweb.integration.memshell.wildfly;
|
||||||
|
|
||||||
|
import com.reajason.javaweb.integration.AbstractContainerTest;
|
||||||
|
import com.reajason.javaweb.integration.ContainerTestConfig;
|
||||||
|
import com.reajason.javaweb.memshell.ShellTool;
|
||||||
|
import com.reajason.javaweb.memshell.ShellType;
|
||||||
|
import com.reajason.javaweb.packer.Packers;
|
||||||
|
import net.bytebuddy.jar.asm.Opcodes;
|
||||||
|
import org.testcontainers.containers.GenericContainer;
|
||||||
|
import org.testcontainers.containers.Network;
|
||||||
|
import org.testcontainers.junit.jupiter.Container;
|
||||||
|
import org.testcontainers.junit.jupiter.Testcontainers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static com.reajason.javaweb.integration.ContainerTool.warJakartaFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ReaJason
|
||||||
|
* @since 2024/12/10
|
||||||
|
*/
|
||||||
|
@Testcontainers
|
||||||
|
public class Wildfly38ContainerTest extends AbstractContainerTest {
|
||||||
|
private static final ContainerTestConfig CONFIG = ContainerTestConfig.undertow(
|
||||||
|
"quay.io/wildfly/wildfly:38.0.1.Final-jdk21",
|
||||||
|
"/opt/jboss/wildfly/standalone/deployments/app.war")
|
||||||
|
.warFile(warJakartaFile)
|
||||||
|
.jakarta(true)
|
||||||
|
.targetJdkVersion(Opcodes.V21)
|
||||||
|
// Suo5 closes the exchange before WildFly 38's internal request listener is destroyed,
|
||||||
|
// causing a benign UT015005/UT000139 log after the functional assertion has passed.
|
||||||
|
.assertLogs(false)
|
||||||
|
.supportedShellTypes(List.of(
|
||||||
|
ShellType.JAKARTA_SERVLET,
|
||||||
|
ShellType.JAKARTA_FILTER,
|
||||||
|
ShellType.JAKARTA_LISTENER,
|
||||||
|
ShellType.UNDERTOW_AGENT_SERVLET_HANDLER
|
||||||
|
))
|
||||||
|
.testPackers(List.of(Packers.JSP))
|
||||||
|
.unSupportedShellTools(List.of(ShellTool.AntSword))
|
||||||
|
.probeShellTypes(List.of(
|
||||||
|
ShellType.JAKARTA_SERVLET,
|
||||||
|
ShellType.JAKARTA_FILTER,
|
||||||
|
ShellType.JAKARTA_LISTENER
|
||||||
|
))
|
||||||
|
.build();
|
||||||
|
|
||||||
|
static Network network = newNetwork();
|
||||||
|
@Container
|
||||||
|
public static final GenericContainer<?> python = buildPythonContainer(network);
|
||||||
|
|
||||||
|
@Container
|
||||||
|
public static final GenericContainer<?> container = buildContainer(CONFIG, network);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ContainerTestConfig getConfig() {
|
||||||
|
return CONFIG;
|
||||||
|
}
|
||||||
|
}
|
||||||
+56
@@ -0,0 +1,56 @@
|
|||||||
|
package com.reajason.javaweb.integration.memshell.wildfly;
|
||||||
|
|
||||||
|
import com.reajason.javaweb.integration.AbstractContainerTest;
|
||||||
|
import com.reajason.javaweb.integration.ContainerTestConfig;
|
||||||
|
import com.reajason.javaweb.memshell.ShellTool;
|
||||||
|
import com.reajason.javaweb.memshell.ShellType;
|
||||||
|
import com.reajason.javaweb.packer.Packers;
|
||||||
|
import net.bytebuddy.jar.asm.Opcodes;
|
||||||
|
import org.testcontainers.containers.GenericContainer;
|
||||||
|
import org.testcontainers.containers.Network;
|
||||||
|
import org.testcontainers.junit.jupiter.Container;
|
||||||
|
import org.testcontainers.junit.jupiter.Testcontainers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static com.reajason.javaweb.integration.ContainerTool.warJakartaFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ReaJason
|
||||||
|
* @since 2024/12/10
|
||||||
|
*/
|
||||||
|
@Testcontainers
|
||||||
|
public class Wildfly41ContainerTest extends AbstractContainerTest {
|
||||||
|
private static final ContainerTestConfig CONFIG = ContainerTestConfig.undertow(
|
||||||
|
"quay.io/wildfly/wildfly:41.0.0.Final-jdk21",
|
||||||
|
"/opt/jboss/wildfly/standalone/deployments/app.war")
|
||||||
|
.warFile(warJakartaFile)
|
||||||
|
.jakarta(true)
|
||||||
|
.targetJdkVersion(Opcodes.V21)
|
||||||
|
.supportedShellTypes(List.of(
|
||||||
|
ShellType.JAKARTA_SERVLET,
|
||||||
|
ShellType.JAKARTA_FILTER,
|
||||||
|
ShellType.JAKARTA_LISTENER,
|
||||||
|
ShellType.UNDERTOW_AGENT_SERVLET_HANDLER
|
||||||
|
))
|
||||||
|
.testPackers(List.of(Packers.JSP))
|
||||||
|
.unSupportedShellTools(List.of(ShellTool.AntSword))
|
||||||
|
.probeShellTypes(List.of(
|
||||||
|
ShellType.JAKARTA_SERVLET,
|
||||||
|
ShellType.JAKARTA_FILTER,
|
||||||
|
ShellType.JAKARTA_LISTENER
|
||||||
|
))
|
||||||
|
.build();
|
||||||
|
|
||||||
|
static Network network = newNetwork();
|
||||||
|
@Container
|
||||||
|
public static final GenericContainer<?> python = buildPythonContainer(network);
|
||||||
|
|
||||||
|
@Container
|
||||||
|
public static final GenericContainer<?> container = buildContainer(CONFIG, network);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ContainerTestConfig getConfig() {
|
||||||
|
return CONFIG;
|
||||||
|
}
|
||||||
|
}
|
||||||
+34
@@ -0,0 +1,34 @@
|
|||||||
|
package com.reajason.javaweb.integration.probe.wildfly;
|
||||||
|
|
||||||
|
import com.reajason.javaweb.integration.probe.AbstractProbeContainerTest;
|
||||||
|
import com.reajason.javaweb.integration.probe.ProbeTestConfig;
|
||||||
|
import net.bytebuddy.jar.asm.Opcodes;
|
||||||
|
import org.testcontainers.containers.GenericContainer;
|
||||||
|
import org.testcontainers.junit.jupiter.Container;
|
||||||
|
import org.testcontainers.junit.jupiter.Testcontainers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ReaJason
|
||||||
|
* @since 2024/12/10
|
||||||
|
*/
|
||||||
|
@Testcontainers
|
||||||
|
public class Wildfly26ContainerTest extends AbstractProbeContainerTest {
|
||||||
|
|
||||||
|
private static final ProbeTestConfig CONFIG = ProbeTestConfig.wildfly("quay.io/wildfly/wildfly:26.1.3.Final-jdk11")
|
||||||
|
.expectedJdkVersion("JDK|11.0.17|55")
|
||||||
|
.targetJdkVersion(Opcodes.V11)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
@Container
|
||||||
|
public static final GenericContainer<?> container = buildContainer(CONFIG);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ProbeTestConfig getConfig() {
|
||||||
|
return CONFIG;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected GenericContainer<?> getContainer() {
|
||||||
|
return container;
|
||||||
|
}
|
||||||
|
}
|
||||||
+34
@@ -0,0 +1,34 @@
|
|||||||
|
package com.reajason.javaweb.integration.probe.wildfly;
|
||||||
|
|
||||||
|
import com.reajason.javaweb.integration.probe.AbstractProbeContainerTest;
|
||||||
|
import com.reajason.javaweb.integration.probe.ProbeTestConfig;
|
||||||
|
import net.bytebuddy.jar.asm.Opcodes;
|
||||||
|
import org.testcontainers.containers.GenericContainer;
|
||||||
|
import org.testcontainers.junit.jupiter.Container;
|
||||||
|
import org.testcontainers.junit.jupiter.Testcontainers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ReaJason
|
||||||
|
* @since 2024/12/10
|
||||||
|
*/
|
||||||
|
@Testcontainers
|
||||||
|
public class Wildfly27ContainerTest extends AbstractProbeContainerTest {
|
||||||
|
|
||||||
|
private static final ProbeTestConfig CONFIG = ProbeTestConfig.wildflyJakarta("quay.io/wildfly/wildfly:27.0.1.Final-jdk11")
|
||||||
|
.expectedJdkVersion("JDK|11.0.17|55")
|
||||||
|
.targetJdkVersion(Opcodes.V11)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
@Container
|
||||||
|
public static final GenericContainer<?> container = buildContainer(CONFIG);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ProbeTestConfig getConfig() {
|
||||||
|
return CONFIG;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected GenericContainer<?> getContainer() {
|
||||||
|
return container;
|
||||||
|
}
|
||||||
|
}
|
||||||
+34
@@ -0,0 +1,34 @@
|
|||||||
|
package com.reajason.javaweb.integration.probe.wildfly;
|
||||||
|
|
||||||
|
import com.reajason.javaweb.integration.probe.AbstractProbeContainerTest;
|
||||||
|
import com.reajason.javaweb.integration.probe.ProbeTestConfig;
|
||||||
|
import net.bytebuddy.jar.asm.Opcodes;
|
||||||
|
import org.testcontainers.containers.GenericContainer;
|
||||||
|
import org.testcontainers.junit.jupiter.Container;
|
||||||
|
import org.testcontainers.junit.jupiter.Testcontainers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ReaJason
|
||||||
|
* @since 2024/12/10
|
||||||
|
*/
|
||||||
|
@Testcontainers
|
||||||
|
public class Wildfly38ContainerTest extends AbstractProbeContainerTest {
|
||||||
|
|
||||||
|
private static final ProbeTestConfig CONFIG = ProbeTestConfig.wildflyJakarta("quay.io/wildfly/wildfly:38.0.1.Final-jdk21")
|
||||||
|
.expectedJdkVersion("JDK|21.0.9|65")
|
||||||
|
.targetJdkVersion(Opcodes.V21)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
@Container
|
||||||
|
public static final GenericContainer<?> container = buildContainer(CONFIG);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ProbeTestConfig getConfig() {
|
||||||
|
return CONFIG;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected GenericContainer<?> getContainer() {
|
||||||
|
return container;
|
||||||
|
}
|
||||||
|
}
|
||||||
+34
@@ -0,0 +1,34 @@
|
|||||||
|
package com.reajason.javaweb.integration.probe.wildfly;
|
||||||
|
|
||||||
|
import com.reajason.javaweb.integration.probe.AbstractProbeContainerTest;
|
||||||
|
import com.reajason.javaweb.integration.probe.ProbeTestConfig;
|
||||||
|
import net.bytebuddy.jar.asm.Opcodes;
|
||||||
|
import org.testcontainers.containers.GenericContainer;
|
||||||
|
import org.testcontainers.junit.jupiter.Container;
|
||||||
|
import org.testcontainers.junit.jupiter.Testcontainers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ReaJason
|
||||||
|
* @since 2024/12/10
|
||||||
|
*/
|
||||||
|
@Testcontainers
|
||||||
|
public class Wildfly41ContainerTest extends AbstractProbeContainerTest {
|
||||||
|
|
||||||
|
private static final ProbeTestConfig CONFIG = ProbeTestConfig.wildflyJakarta("quay.io/wildfly/wildfly:41.0.0.Final-jdk21")
|
||||||
|
.expectedJdkVersion("JDK|21.0.11|65")
|
||||||
|
.targetJdkVersion(Opcodes.V21)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
@Container
|
||||||
|
public static final GenericContainer<?> container = buildContainer(CONFIG);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ProbeTestConfig getConfig() {
|
||||||
|
return CONFIG;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected GenericContainer<?> getContainer() {
|
||||||
|
return container;
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user