mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-21 22:50:42 +08:00
test: pid fetch failed
This commit is contained in:
Executable
+2
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
pgrep -a java | awk '{print $1}' | tr -d '\n'
|
||||
@@ -1,2 +1,2 @@
|
||||
#!/bin/bash
|
||||
pgrep -a java | awk '{print $1}' | tr -d '\n'
|
||||
jps | grep -E "jar" | awk '{print $1}' | tr -d '\n'
|
||||
@@ -38,6 +38,7 @@ public class ContainerTool {
|
||||
public static final MountableFile webspherePid = MountableFile.forHostPath(Path.of("script", "websphere_pid.sh"));
|
||||
public static final MountableFile weblogicPid = MountableFile.forHostPath(Path.of("script", "weblogic_pid.sh"));
|
||||
public static final MountableFile springbootPid = MountableFile.forHostPath(Path.of("script", "springboot_pid.sh"));
|
||||
public static final MountableFile javaPid = MountableFile.forHostPath(Path.of("script", "java_pid.sh"));
|
||||
|
||||
public static String getUrl(GenericContainer<?> container) {
|
||||
int port = container.getMappedPort(8080);
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ public class SpringBoot2ContainerTest {
|
||||
public final static GenericContainer<?> container = new GenericContainer<>(new ImageFromDockerfile()
|
||||
.withDockerfile(springBoot2Dockerfile))
|
||||
.withCopyToContainer(jattachFile, "/jattach")
|
||||
.withCopyToContainer(springbootPid, "/fetch_pid.sh")
|
||||
.withCopyToContainer(javaPid, "/fetch_pid.sh")
|
||||
.withNetwork(network)
|
||||
.withNetworkAliases("app")
|
||||
.waitingFor(Wait.forHttp("/test"))
|
||||
|
||||
Reference in New Issue
Block a user