diff --git a/spring-cloud-kubernetes-dependencies/pom.xml b/spring-cloud-kubernetes-dependencies/pom.xml index 021f8ece..e331786e 100644 --- a/spring-cloud-kubernetes-dependencies/pom.xml +++ b/spring-cloud-kubernetes-dependencies/pom.xml @@ -14,8 +14,8 @@ Spring Cloud Kubernetes :: Dependencies Spring Cloud Kubernetes Dependencies - 1.1.12.Final - 1.0.0.Alpha20 + 1.1.13.Final + 1.3.2 2.2.0 0.0.12 3.0.2 diff --git a/spring-cloud-kubernetes-examples/kubernetes-hello-world-example/README.md b/spring-cloud-kubernetes-examples/kubernetes-hello-world-example/README.md index d5efdc60..cb4c86a8 100644 --- a/spring-cloud-kubernetes-examples/kubernetes-hello-world-example/README.md +++ b/spring-cloud-kubernetes-examples/kubernetes-hello-world-example/README.md @@ -38,12 +38,15 @@ curl http://IP_OR_HOSTNAME/ ## Integration test -To deploy the replication controller, create the pod & access its service on Kubernetes, we will use the Arquillian Kubernetes Cube framework. -It will use the yaml configuration file generated by the Fabric8 maven plugin in order to talk to the platform toi create the different objects;replication controller, -pod, service ... -When the service becomes available, the unit test which is a HTTP Client will call the endpoint to verify that it receives as reponse message "Hello World" +To deploy the resources required on Kubernetes/OpenShift and to test if the service deployed can answer to requests, we will use the [Arquillian Kubernetes Cube](https://github.com/arquillian/arquillian-cube/blob/master/docs/kubernetes.adoc) framework. +This testing framework uses the Kubernetes Java API to communicate with the platform, deploy the resources (pod, service, deployment, ...) generated by the Fabric8 maven plugin. +When the service becomes available, the method defines within thr Junit test will call the endpoint to verify that it receives as response the string +`Hello World` -To play with the integration test, execute the following maven command: +Remark : If you run the integration test against OpenShift, create first the namespace/project `it` that arquillian will use to deploy the resources using the oc client +`oc new-project it`. + +When you are logged to the OpenShift platform, execute the following maven command to run the Integration Test against OpenShift ``` mvn clean install -Pintegration diff --git a/spring-cloud-kubernetes-examples/kubernetes-hello-world-example/pom.xml b/spring-cloud-kubernetes-examples/kubernetes-hello-world-example/pom.xml index 5bd98b97..1169d8e2 100644 --- a/spring-cloud-kubernetes-examples/kubernetes-hello-world-example/pom.xml +++ b/spring-cloud-kubernetes-examples/kubernetes-hello-world-example/pom.xml @@ -71,6 +71,11 @@ arquillian-cube-kubernetes test + + org.arquillian.cube + arquillian-cube-openshift + test + @@ -188,7 +193,6 @@ fmp resource - helm build diff --git a/spring-cloud-kubernetes-examples/kubernetes-hello-world-example/src/test/resources/arquillian.xml b/spring-cloud-kubernetes-examples/kubernetes-hello-world-example/src/test/resources/arquillian.xml index 35f0335e..570f95f9 100644 --- a/spring-cloud-kubernetes-examples/kubernetes-hello-world-example/src/test/resources/arquillian.xml +++ b/spring-cloud-kubernetes-examples/kubernetes-hello-world-example/src/test/resources/arquillian.xml @@ -4,6 +4,10 @@ xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd"> - + + it + + openshift.yml + true diff --git a/spring-cloud-kubernetes-examples/kubernetes-hello-world-example/src/test/resources/logback-test.xml b/spring-cloud-kubernetes-examples/kubernetes-hello-world-example/src/test/resources/logback-test.xml index 9e33eaf4..60916e94 100644 --- a/spring-cloud-kubernetes-examples/kubernetes-hello-world-example/src/test/resources/logback-test.xml +++ b/spring-cloud-kubernetes-examples/kubernetes-hello-world-example/src/test/resources/logback-test.xml @@ -1,5 +1,16 @@ - + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + - \ No newline at end of file + + + +