Skip to content

Commit

Permalink
Resume Docker integrations tests (#1317)
Browse files Browse the repository at this point in the history
* [issues-1315] - Fix RequestSpecBuilderResourceProvider in order to take the desired request base path into account

* [issues-1315] - Fix functional tests in order to replace the no longer existing jonmorehouse/ping-pong Docker image

* [issues-1315] - Bump docker-java and jboss-parent versions

* [issues-1315] - Remove redundant docker-java dependency version from docker/assertj/pom.xml

* [issues-1315] - Adding required dependencies to docker/docker/pom.xml, for classloader to include javax.*

* [issues-1315] - Fixing how the docker-compose.yml config file path is computed, since java.nio.Paths in JDK 11 does not allow for URI with null schema

* [issues-1315] - Bumping Tomcat image tag used in Docker related tests from 7 to 10, from 6 to 9 where a previous version is used
In docker functional tests: switch from javax.* to jakarta.* in deployments, in order to let containers provide depoyments which byteconde is compatible with JDK 11

* [issues-1315] - Switch from javax.* to jakarta.* in Fabric8 maven plugin tests

* [issues-1315] - Bumping Tomcat image tag used in ftest-docker-compose-v2 tests, switch from javax.* to jakarta.* in deployments, in order to let containers provide depoyments which byteconde is compatible with JDK 11, make the Tomcat manager app available in deployments, and relax the Tomcat 10 context.xml file requirements to allow connections routed from the container host IP address

* [issues-1315] - Update the dependency for the JSch (Java SSH API) in order to use the well maintained fork om.github.mwiede/jsch, which allows for more recently generated private keys

* [issues-1315] - Use a different image for the FTP server in ftest-docker-containerobject, and updating tests and resources accordingly, since dipakpawar231/proftpd:v1 is no longer available

* [issues-1315] - Replace the no longer available jonmorehouse/ping-pong image with the hashicorp/http-echo image

* [issues-1315] - Bumping the WildFly image tag used in ftest-container-star-operator tests, switch from javax.* to jakarta.* in deployments, in order to let containers provide depoyments which byteconde is compatible with JDK 11

* [issues-1315] - Replacing the git origin for ftest-docker-compose-v2-git-context (https://github.com/lordofthejars/pingpongdockerfile.git) with  https://github.com/tsongpon/pingpong.git, since the former points to the no longer available jonmorehouse/ping-pong

* [issues-1315] - Replace the no longer available jonmorehouse/ping-pong image with the tsongpon/pingpong image, where hashicorp/http-echo is tricky to configure due to commands, envs and docker compose combination

* [issues-1315] - CI, enabling Docker integration tests

* [issues-1315] - Updating the used h2 image in docker/ftest, docker/ftest-standalone and docker/ftest-junit-rules. Also - in docker/ftest - bumping the WildFly version, and adding relaxed context.xml for Tomacat 10 to allow external connections, plus enabling the manager app

* [issues-1315] - Bumping the docker server API version to 1.43 the latest supported by docker-java 3.4.0

* [issues-1315] - Replacing port 5000 with 5432 for docker/ftest-docker-containerobject tests, since 5000 is already in use by GitHub runners that execute CI checks

* [issues-1315] - Fixing more outdated WildFly images in tests and docs

* [issues-1315] - Fixing more dependencies configuration

* [issues-1315] - Fixing the GitHub workflow CI script in order to use a more recent version for the setup-minikube step

---------

Co-authored-by: Fabio Burzigotti <[email protected]>
  • Loading branch information
fabiobrz and fabiobrz authored Oct 14, 2024
1 parent ef368b4 commit 525d835
Show file tree
Hide file tree
Showing 82 changed files with 390 additions and 346 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ jobs:
# failsafe.groups configuration depends on the env setup.
FAILSAFE_GROUPS: ''
steps:
- name: Setup Minikube # add an if for the kubernetes target only?
uses: manusa/[email protected]
- name: Setup Minikube
if: ${{ matrix.target == 'kubernetes' }}
uses: manusa/[email protected]
with:
driver: docker
container runtime: containerd
Expand All @@ -36,6 +37,7 @@ jobs:
github token: ${{ secrets.GITHUB_TOKEN }}
start args: "--memory='4gb' --cpus='2'"
- name: Enable minikube registry
if: ${{ matrix.target == 'kubernetes' }}
run: |
minikube addons enable registry
kubectl port-forward --namespace kube-system service/registry 5000:80 &
Expand All @@ -58,7 +60,7 @@ jobs:
- name: Build and run integration tests for Docker target (${{ matrix.java }})
if: ${{ matrix.target == 'docker' }}
run: |
./mvnw package -Dfailsafe.groups=org.arquillian.cube.docker.impl.requirement.RequiresDocker -Dcontainerless.skip.tests=true
./mvnw verify -Dfailsafe.groups=org.arquillian.cube.docker.impl.requirement.RequiresDocker -Dcontainerless.skip.tests=true
- name: Build and run integration tests for Kubernetes target (${{ matrix.java }})
if: ${{ matrix.target == 'kubernetes' }}
run: |
Expand All @@ -71,5 +73,6 @@ jobs:
'${{ github.workspace }}/**/surefire-reports/*.*'
'${{ github.workspace }}/**/*.log'
- name: Stop minikube
if: ${{ matrix.target == 'kubernetes' }}
run: |
minikube stop
1 change: 0 additions & 1 deletion containerless/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
<tests.exp.undertow>**/*Daytime*</tests.exp.undertow>
<tests.container.node>node</tests.container.node>
<tests.container.undertow>daytime</tests.container.undertow>
<docker.api.version>1.30</docker.api.version>
<docker.api.url>tcp://localhost:2375</docker.api.url>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
public class ContainerConfigurationControllerTest extends AbstractManagerTestBase {

public static final String CUBE_ID = "test";
private static final String CONTENT = "" + "image: tutum/tomcat:7.0\n" + "exposedPorts: [8089/tcp]\n"
private static final String CONTENT = "" + "image: tomcat:10.1.30\n" + "exposedPorts: [8089/tcp]\n"
+ "portBindings: [8090->8089/tcp]";

@Mock
Expand Down
1 change: 0 additions & 1 deletion docker/assertj/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
<dependency>
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java</artifactId>
<version>${version.docker-java}</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
19 changes: 19 additions & 0 deletions docker/docker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,28 @@
<relativePath>../pom.xml</relativePath>
</parent>
<name>Arquillian Cube Docker</name>
<properties>
<version.javax.ws.rs-api>2.1.1</version.javax.ws.rs-api>
<version.javax.annotation-api>1.3.2</version.javax.annotation-api>
</properties>
<artifactId>arquillian-cube-docker</artifactId>

<dependencies>
<!--
TODO: Needed because arquillian-core and docker-java still need javax.* classes.
To be removed once arquillian-core version is bumped version is bumped, docker-java to be evaluated
-->
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>${version.javax.ws.rs-api}</version>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>${version.javax.annotation-api}</version>
</dependency>

<dependency>
<groupId>org.arquillian.cube</groupId>
<artifactId>arquillian-cube-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static DockerCompositions convert(DefinitionFormat definitionFormat, URI.

private static DockerCompositions convert(URI uri, DefinitionFormat definitionFormat) throws IOException {
try {
Path definitionFilePath = Paths.get(uri);
Path definitionFilePath = uri.getScheme() == null ? Paths.get(uri.toString()).toAbsolutePath() : Paths.get(uri);
return convert(definitionFilePath, definitionFormat);
} catch (FileSystemNotFoundException e) {
String content = "";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
org.arquillian.cube.docker.impl.requirement.DockerMachineRequirement
org.arquillian.cube.docker.impl.requirement.DockerRequirement
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class AwaitStrategyTest {
@Test
public void should_be_able_to_create_http_await_strategy() {
String containerDefinition = "tomcat:\n" +
" image: tutum/tomcat:7.0\n" +
" image: tomcat:10.1.30\n" +
" exposedPorts: [8089/tcp]\n" +
" await:\n" +
" strategy: http\n" +
Expand Down Expand Up @@ -316,7 +316,7 @@ public void should_create_log_scanning_await_strategy_without_defaults() {
@Test
public void should_parse_command() {
String containerDefinition = "tomcat:\n"
+ " image: tutum/tomcat:7.0\n"
+ " image: tomcat:10.1.30\n"
+ " exposedPorts: [8089/tcp]\n"
+ " await:\n"
+ " strategy: docker_health\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ public class AfterStartContainerObserverTest extends AbstractManagerTestBase {

private static final String CONTAINER_COPY_CONFIGURATION =
"tomcat_default:\n" +
" image: tutum/tomcat:7.0\n" +
" image: tomcat:10.1.30\n" +
" afterStart:\n" +
" - copy:\n" +
" to: /test\n" +
" from: ";

private static final String CONTAINER_CUSTOM_AFTER_START_ACTION_CONFIGURATION =
"tomcat_default:\n" +
" image: tutum/tomcat:7.0\n" +
" image: tomcat:10.1.30\n" +
" afterStart:\n" +
" - customAfterStartAction:\n" +
" strategy: org.arquillian.cube.docker.impl.afterStart.CustomAfterStartActionImpl";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ public class AfterStopContainerObserverTest extends AbstractManagerTestBase {

private static final String CONTAINER_COPY_CONFIGURATION =
"tomcat_default:\n" +
" image: tutum/tomcat:7.0\n" +
" image: tomcat:10.1.30\n" +
" afterStop:\n" +
" - copy:\n" +
" from: /test\n" +
" to: ";

private static final String CONTAINER_LOG_CONFIGURATION =
"tomcat_default:\n" +
" image: tutum/tomcat:7.0\n" +
" image: tomcat:10.1.30\n" +
" afterStop:\n" +
" - log:\n" +
" to: ";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void shouldStartNoneDeployableContainersWithRegisteredNetwork() {
+
"tomcat:\n"
+
" image: tutum/tomcat:7.0\n"
" image: tomcat:10.1.30\n"
+
" exposedPorts: [8089/tcp]\n"
+
Expand All @@ -40,7 +40,7 @@ public void shouldStartNoneDeployableContainersWithRegisteredNetwork() {
+
"pingpong:\n"
+
" image: jonmorehouse/ping-pong\n"
" image: tsongpon/pingpong\n"
+
" exposedPorts: [8080/tcp]\n"
+
Expand Down Expand Up @@ -68,7 +68,7 @@ public void shouldNotStartManualContainers() {
String config =
"tomcat:\n"
+
" image: tutum/tomcat:7.0\n"
" image: tomcat:10.1.30\n"
+
" exposedPorts: [8089/tcp]\n"
+
Expand All @@ -78,7 +78,7 @@ public void shouldNotStartManualContainers() {
+
"pingpong:\n"
+
" image: jonmorehouse/ping-pong\n"
" image: tsongpon/pingpong\n"
+
" exposedPorts: [8080/tcp]\n"
+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,22 @@ public class BeforeStopContainerObserverTest extends AbstractManagerTestBase {

private static final String CONTAINER_COPY_CONFIGURATION =
"tomcat_default:\n" +
" image: tutum/tomcat:7.0\n" +
" image: tomcat:10.1.30\n" +
" beforeStop:\n" +
" - copy:\n" +
" from: /test\n" +
" to: ";

private static final String CONTAINER_LOG_CONFIGURATION =
"tomcat_default:\n" +
" image: tutum/tomcat:7.0\n" +
" image: tomcat:10.1.30\n" +
" beforeStop:\n" +
" - log:\n" +
" to: ";

private static final String CONTAINER_CUSTOM_BEFORE_STOP_ACTION_CONFIGURATION =
"tomcat_default:\n" +
" image: tutum/tomcat:7.0\n" +
" image: tomcat:10.1.30\n" +
" beforeStop:\n" +
" - customBeforeStopAction:\n" +
" strategy: org.arquillian.cube.docker.impl.beforeStop.CustomBeforeStopActionImpl";
Expand Down
Loading

0 comments on commit 525d835

Please sign in to comment.