diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/ContainerTool.java b/integration-test/src/test/java/com/reajason/javaweb/integration/ContainerTool.java index 06ff4f49..ce2a63d1 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/ContainerTool.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/ContainerTool.java @@ -15,7 +15,7 @@ public class ContainerTool { public static final MountableFile warJakartaFile = MountableFile.forHostPath(Path.of("..", "vul", "vul-webapp-jakarta", "build", "libs", "vul-webapp-jakarta.war").toAbsolutePath()); public static final MountableFile warExpressionFile = MountableFile.forHostPath(Path.of("..", "vul", "vul-webapp-expression", "build", "libs", "vul-webapp-expression.war").toAbsolutePath()); public static final MountableFile warDeserializeFile = MountableFile.forHostPath(Path.of("..", "vul", "vul-webapp-deserialize", "build", "libs", "vul-webapp-deserialize.war").toAbsolutePath()); - public static final MountableFile warFile = MountableFile.forHostPath(Path.of("..", "vul", "vul-webapp", "build", "libs", "vul-webapp.war").toAbsolutePath()); + public static final MountableFile warFile = MountableFile.forHostPath(Path.of("..", "vul", "vul-webapp", "build", "libs", "vul-webapp.war").toAbsolutePath(), 0666); public static final MountableFile struct2WarFile = MountableFile.forHostPath(Path.of("..", "vul", "vul-struct2", "build", "libs", "vul-struct2.war").toAbsolutePath()); public static final MountableFile springBoot2WarFile = MountableFile.forHostPath(Path.of("..", "vul", "vul-springboot2", "build", "libs", "vul-springboot2.war").toAbsolutePath()); public static final Path neoGeorgDockerfile = Path.of("..", "asserts", "neoreg", "Dockerfile").toAbsolutePath(); diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/memshell/websphere/OpenLiberty18ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/memshell/websphere/OpenLiberty18ContainerTest.java index 3946238b..007271a3 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/memshell/websphere/OpenLiberty18ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/memshell/websphere/OpenLiberty18ContainerTest.java @@ -44,7 +44,7 @@ public class OpenLiberty18ContainerTest { .withNetwork(network); @Container public final static GenericContainer container = new GenericContainer<>(imageName) - .withFileSystemBind(warFile.getFilesystemPath(), "/config/dropins/app.war", BindMode.READ_WRITE) + .withCopyToContainer(warFile, "/config/dropins/app.war") .withCopyToContainer(jattachFile, "/jattach") .withCopyToContainer(webspherePid, "/fetch_pid.sh") .withNetwork(network) diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/memshell/websphere/OpenLiberty20ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/memshell/websphere/OpenLiberty20ContainerTest.java index d5f2aef0..6fde0402 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/memshell/websphere/OpenLiberty20ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/memshell/websphere/OpenLiberty20ContainerTest.java @@ -44,7 +44,7 @@ public class OpenLiberty20ContainerTest { .withNetwork(network); @Container public final static GenericContainer container = new GenericContainer<>(imageName) - .withFileSystemBind(warFile.getFilesystemPath(), "/config/dropins/app.war", BindMode.READ_WRITE) + .withCopyToContainer(warFile, "/config/dropins/app.war") .withCopyToContainer(jattachFile, "/jattach") .withCopyToContainer(webspherePid, "/fetch_pid.sh") .withNetwork(network) diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/memshell/websphere/OpenLiberty22ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/memshell/websphere/OpenLiberty22ContainerTest.java index ba080917..46c047bb 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/memshell/websphere/OpenLiberty22ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/memshell/websphere/OpenLiberty22ContainerTest.java @@ -44,7 +44,7 @@ public class OpenLiberty22ContainerTest { .withNetwork(network); @Container public final static GenericContainer container = new GenericContainer<>(imageName) - .withFileSystemBind(warFile.getFilesystemPath(), "/config/dropins/app.war", BindMode.READ_WRITE) + .withCopyToContainer(warFile, "/config/dropins/app.war") .withCopyToContainer(jattachFile, "/jattach") .withCopyToContainer(webspherePid, "/fetch_pid.sh") .withNetwork(network) diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/memshell/websphere/OpenLiberty25ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/memshell/websphere/OpenLiberty25ContainerTest.java index 85b04bf1..2bf40204 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/memshell/websphere/OpenLiberty25ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/memshell/websphere/OpenLiberty25ContainerTest.java @@ -44,7 +44,7 @@ public class OpenLiberty25ContainerTest { .withNetwork(network); @Container public final static GenericContainer container = new GenericContainer<>(imageName) - .withFileSystemBind(warFile.getFilesystemPath(), "/config/dropins/app.war", BindMode.READ_WRITE) + .withCopyToContainer(warFile, "/config/dropins/app.war") .withCopyToContainer(jattachFile, "/jattach") .withCopyToContainer(webspherePid, "/fetch_pid.sh") .withNetwork(network) diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/memshell/websphere/WebSphere855ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/memshell/websphere/WebSphere855ContainerTest.java index 499c54f0..c6477504 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/memshell/websphere/WebSphere855ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/memshell/websphere/WebSphere855ContainerTest.java @@ -44,7 +44,7 @@ public class WebSphere855ContainerTest { .withNetwork(network); @Container public final static GenericContainer container = new GenericContainer<>(imageName) - .withFileSystemBind(warFile.getFilesystemPath(), "/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/monitoredDeployableApps/servers/server1/app.war", BindMode.READ_WRITE) + .withCopyToContainer(warFile, "/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/monitoredDeployableApps/servers/server1/app.war") .withCopyToContainer(jattachFile, "/jattach") .withCopyToContainer(webspherePid, "/fetch_pid.sh") .withNetwork(network) diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/memshell/websphere/WebSphere905ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/memshell/websphere/WebSphere905ContainerTest.java index fab38b41..4c3c7340 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/memshell/websphere/WebSphere905ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/memshell/websphere/WebSphere905ContainerTest.java @@ -44,7 +44,7 @@ public class WebSphere905ContainerTest { .withNetwork(network); @Container public final static GenericContainer container = new GenericContainer<>(imageName) - .withFileSystemBind(warFile.getFilesystemPath(), "/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/monitoredDeployableApps/servers/server1/app.war", BindMode.READ_WRITE) + .withCopyToContainer(warFile, "/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/monitoredDeployableApps/servers/server1/app.war") .withCopyToContainer(jattachFile, "/jattach") .withCopyToContainer(webspherePid, "/fetch_pid.sh") .withNetwork(network) diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/memshell/websphere7/WebSphere700ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/memshell/websphere7/WebSphere700ContainerTest.java index 4485832c..5ebb2830 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/memshell/websphere7/WebSphere700ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/memshell/websphere7/WebSphere700ContainerTest.java @@ -42,7 +42,7 @@ public class WebSphere700ContainerTest { .withNetwork(network); @Container public final static GenericContainer container = new GenericContainer<>(imageName) - .withFileSystemBind(warFile.getFilesystemPath(), "/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/monitoredDeployableApps/servers/server1/app.war", BindMode.READ_WRITE) + .withCopyToContainer(warFile, "/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/monitoredDeployableApps/servers/server1/app.war") .withCopyToContainer(jattachFile, "/jattach") .withCopyToContainer(webspherePid, "/fetch_pid.sh") .withNetwork(network) diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/probe/websphere/OpenLiberty18ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/probe/websphere/OpenLiberty18ContainerTest.java index ddfdd6f3..9e36d029 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/probe/websphere/OpenLiberty18ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/probe/websphere/OpenLiberty18ContainerTest.java @@ -33,7 +33,7 @@ public class OpenLiberty18ContainerTest { public static final String imageName = "open-liberty:18.0.0.4-webProfile8"; @Container public final static GenericContainer container = new GenericContainer<>(imageName) - .withFileSystemBind(warFile.getFilesystemPath(), "/config/dropins/app.war", BindMode.READ_WRITE) + .withCopyToContainer(warFile, "/config/dropins/app.war") .waitingFor(Wait.forHttp("/app/").forPort(9080).withStartupTimeout(Duration.ofMinutes(5))) .withExposedPorts(9080) .withPrivilegedMode(true); diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/probe/websphere/OpenLiberty20ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/probe/websphere/OpenLiberty20ContainerTest.java index 8c027663..c2f922d2 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/probe/websphere/OpenLiberty20ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/probe/websphere/OpenLiberty20ContainerTest.java @@ -33,7 +33,7 @@ public class OpenLiberty20ContainerTest { public static final String imageName = "open-liberty:20.0.0.12-full-java8-openj9"; @Container public final static GenericContainer container = new GenericContainer<>(imageName) - .withFileSystemBind(warFile.getFilesystemPath(), "/config/dropins/app.war", BindMode.READ_WRITE) + .withCopyToContainer(warFile, "/config/dropins/app.war") .waitingFor(Wait.forHttp("/app/").forPort(9080).withStartupTimeout(Duration.ofMinutes(5))) .withExposedPorts(9080) .withPrivilegedMode(true); diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/probe/websphere/OpenLiberty22ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/probe/websphere/OpenLiberty22ContainerTest.java index ae9a63c3..cec751cc 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/probe/websphere/OpenLiberty22ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/probe/websphere/OpenLiberty22ContainerTest.java @@ -33,7 +33,7 @@ public class OpenLiberty22ContainerTest { public static final String imageName = "open-liberty:22.0.0.12-full-java11-openj9"; @Container public final static GenericContainer container = new GenericContainer<>(imageName) - .withFileSystemBind(warFile.getFilesystemPath(), "/config/dropins/app.war", BindMode.READ_WRITE) + .withCopyToContainer(warFile, "/config/dropins/app.war") .waitingFor(Wait.forHttp("/app/").forPort(9080).withStartupTimeout(Duration.ofMinutes(5))) .withExposedPorts(9080) .withPrivilegedMode(true); diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/probe/websphere/OpenLiberty25ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/probe/websphere/OpenLiberty25ContainerTest.java index 362d644c..95a2ee3d 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/probe/websphere/OpenLiberty25ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/probe/websphere/OpenLiberty25ContainerTest.java @@ -33,7 +33,7 @@ public class OpenLiberty25ContainerTest { public static final String imageName = "open-liberty:25.0.0.12-full-java17-openj9"; @Container public final static GenericContainer container = new GenericContainer<>(imageName) - .withFileSystemBind(warFile.getFilesystemPath(), "/config/dropins/app.war", BindMode.READ_WRITE) + .withCopyToContainer(warFile, "/config/dropins/app.war") .waitingFor(Wait.forHttp("/app/").forPort(9080).withStartupTimeout(Duration.ofMinutes(5))) .withExposedPorts(9080) .withPrivilegedMode(true); diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/probe/websphere/WebSphere855ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/probe/websphere/WebSphere855ContainerTest.java index 537e06ce..b166b438 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/probe/websphere/WebSphere855ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/probe/websphere/WebSphere855ContainerTest.java @@ -33,7 +33,7 @@ public class WebSphere855ContainerTest { public static final String imageName = "reajason/websphere:8.5.5.24"; @Container public final static GenericContainer container = new GenericContainer<>(imageName) - .withFileSystemBind(warFile.getFilesystemPath(), "/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/monitoredDeployableApps/servers/server1/app.war", BindMode.READ_WRITE) + .withCopyToContainer(warFile, "/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/monitoredDeployableApps/servers/server1/app.war") .waitingFor(Wait.forHttp("/app/").forPort(9080).withStartupTimeout(Duration.ofMinutes(5))) .withExposedPorts(9080) .withPrivilegedMode(true); diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/probe/websphere/WebSphere905ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/probe/websphere/WebSphere905ContainerTest.java index 4fd57561..b923382e 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/probe/websphere/WebSphere905ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/probe/websphere/WebSphere905ContainerTest.java @@ -32,7 +32,7 @@ public class WebSphere905ContainerTest { public static final String imageName = "reajason/websphere:9.0.5.17"; @Container public final static GenericContainer container = new GenericContainer<>(imageName) - .withFileSystemBind(warFile.getFilesystemPath(), "/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/monitoredDeployableApps/servers/server1/app.war", BindMode.READ_WRITE) + .withCopyToContainer(warFile, "/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/monitoredDeployableApps/servers/server1/app.war") .waitingFor(Wait.forHttp("/app/").forPort(9080).withStartupTimeout(Duration.ofMinutes(5))) .withExposedPorts(9080) .withPrivilegedMode(true); diff --git a/integration-test/src/test/java/com/reajason/javaweb/integration/probe/websphere7/WebSphere700ContainerTest.java b/integration-test/src/test/java/com/reajason/javaweb/integration/probe/websphere7/WebSphere700ContainerTest.java index 673817ed..3e09d657 100644 --- a/integration-test/src/test/java/com/reajason/javaweb/integration/probe/websphere7/WebSphere700ContainerTest.java +++ b/integration-test/src/test/java/com/reajason/javaweb/integration/probe/websphere7/WebSphere700ContainerTest.java @@ -30,7 +30,7 @@ public class WebSphere700ContainerTest { public static final String imageName = "reajason/websphere:7.0.0.21"; @Container public final static GenericContainer container = new GenericContainer<>(imageName) - .withFileSystemBind(warFile.getFilesystemPath(), "/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/monitoredDeployableApps/servers/server1/app.war", BindMode.READ_WRITE) + .withCopyToContainer(warFile, "/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/monitoredDeployableApps/servers/server1/app.war") .waitingFor(Wait.forHttp("/app/").forPort(9080).withStartupTimeout(Duration.ofMinutes(5))) .withExposedPorts(9080) .withPrivilegedMode(true);