mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-21 22:50:42 +08:00
test: fix failed cases
This commit is contained in:
@@ -31,7 +31,9 @@ dependencies {
|
||||
testImplementation(libs.logback.classic)
|
||||
testRuntimeOnly(libs.junit.platform.launcher)
|
||||
testImplementation(libs.hamcrest)
|
||||
testImplementation(libs.bundles.testcontainers)
|
||||
testImplementation(libs.bundles.testcontainers) {
|
||||
exclude(group = "net.java.dev.jna", module = "jna")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
|
||||
+3
-3
@@ -11,7 +11,7 @@ import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.Arguments;
|
||||
import org.junit.jupiter.params.provider.MethodSource;
|
||||
import org.testcontainers.containers.DockerComposeContainer;
|
||||
import org.testcontainers.containers.ComposeContainer;
|
||||
import org.testcontainers.junit.jupiter.Container;
|
||||
import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
|
||||
@@ -33,8 +33,8 @@ public class XxlJob220ContainerTest {
|
||||
public static final String imageName = "xxljob/xxljob220";
|
||||
|
||||
@Container
|
||||
public static final DockerComposeContainer<?> compose =
|
||||
new DockerComposeContainer<>(new File("docker-compose/xxl-job/docker-compose-220.yaml"))
|
||||
public static final ComposeContainer compose =
|
||||
new ComposeContainer(new File("docker-compose/xxl-job/docker-compose-220.yaml"))
|
||||
.withExposedService("executor", 9999);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
|
||||
+3
-3
@@ -11,7 +11,7 @@ import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.Arguments;
|
||||
import org.junit.jupiter.params.provider.MethodSource;
|
||||
import org.testcontainers.containers.DockerComposeContainer;
|
||||
import org.testcontainers.containers.ComposeContainer;
|
||||
import org.testcontainers.junit.jupiter.Container;
|
||||
import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
|
||||
@@ -33,8 +33,8 @@ public class XxlJob230ContainerTest {
|
||||
public static final String imageName = "xxljob/xxljob230";
|
||||
|
||||
@Container
|
||||
public static final DockerComposeContainer<?> compose =
|
||||
new DockerComposeContainer<>(new File("docker-compose/xxl-job/docker-compose-230.yaml"))
|
||||
public static final ComposeContainer compose =
|
||||
new ComposeContainer(new File("docker-compose/xxl-job/docker-compose-230.yaml"))
|
||||
.withExposedService("executor", 9999);
|
||||
|
||||
static Stream<Arguments> casesProvider() {
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ public class Jetty12ee10ContainerTest {
|
||||
void testJDK() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getJdkDetection());
|
||||
assertEquals("JRE|21.0.7|65", data);
|
||||
assertEquals("JRE|21.0.9|65", data);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ public class Jetty12ee8ContainerTest {
|
||||
void testJDK() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getJdkDetection());
|
||||
assertEquals("JRE|21.0.7|65", data);
|
||||
assertEquals("JRE|21.0.9|65", data);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ public class Jetty12ee9ContainerTest {
|
||||
void testJDK() {
|
||||
String url = getUrl(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getJdkDetection());
|
||||
assertEquals("JRE|21.0.7|65", data);
|
||||
assertEquals("JRE|21.0.9|65", data);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ public class SpringBoot2WebFluxContainerTest {
|
||||
void testJDK() {
|
||||
String url = getUrlFromSpringBoot(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getJdkDetection());
|
||||
assertEquals("JDK|1.8.0_342|52", data);
|
||||
assertEquals("JDK|1.8.0_472|52", data);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ public class SpringBoot3WebFluxContainerTest {
|
||||
void testJDK() {
|
||||
String url = getUrlFromSpringBoot(container);
|
||||
String data = VulTool.post(url + "/b64", DetectionTool.getJdkDetection());
|
||||
assertEquals("JDK|17.0.2|61", data);
|
||||
assertEquals("JDK|17.0.17|61", data);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user