Simplify integration test run
This commit is contained in:
committed by
Ioannis Canellos
parent
9f02f7e753
commit
29bbfedd7b
@@ -88,9 +88,7 @@ jobs:
|
||||
- run:
|
||||
name: Run integration tests
|
||||
command: |
|
||||
cd spring-cloud-kubernetes-integration-tests
|
||||
/snap/bin/microk8s.kubectl config view --raw > /tmp/kubeconfig
|
||||
./deploy_test_undeploy_all.sh
|
||||
KUBECONFIG=/tmp/kubeconfig mvn clean package fabric8:build verify -Pfmp,it
|
||||
- store_test_results:
|
||||
path: $HOME/artifacts/junit/
|
||||
- store_artifacts:
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
# The script launches and tests each test application - one at a time
|
||||
|
||||
for D in $(find . -maxdepth 1 -mindepth 1 -not -path '*/\.*' -type d); do
|
||||
pushd ${D} > /dev/null
|
||||
../deploy_test_undeploy_single.sh
|
||||
/snap/bin/microk8s.kubectl wait --for=delete pod -l group=org.springframework.cloud --timeout=60s > /dev/null
|
||||
popd > /dev/null
|
||||
done
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
# The script assumes that there is only one application deployed by FMP running at a time
|
||||
|
||||
SCRIPT_ABSOLUTE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
mvnCmd="${SCRIPT_ABSOLUTE_DIR}"/../mvnw
|
||||
kubectlCmd=/snap/bin/microk8s.kubectl
|
||||
|
||||
export KUBECONFIG=/tmp/kubeconfig
|
||||
|
||||
echo "Starting application deployment to cluster"
|
||||
$mvnCmd clean package fabric8:build fabric8:push fabric8:deploy -Pfmp
|
||||
echo "Finished deployment"
|
||||
|
||||
echo "Waiting for pod to become Ready"
|
||||
# We are leveraging the fact the fact that FMP adds the group label and the fact that only one
|
||||
# application can be running at a time
|
||||
$kubectlCmd wait --for=condition=Ready pod -l group=org.springframework.cloud --timeout=60s > /dev/null
|
||||
|
||||
echo "Starting the integration tests"
|
||||
$mvnCmd verify -Pfmp,it -Dfabric8.skip
|
||||
|
||||
echo "Successfully executed integration tests"
|
||||
echo "Undeploying application"
|
||||
$mvnCmd fabric8:undeploy -Pfmp
|
||||
@@ -4,10 +4,6 @@
|
||||
|
||||
<extension qualifier="kubernetes">
|
||||
<property name="namespace.use.existing">default</property>
|
||||
|
||||
<!-- Make sure Arquillian Cube does not setup or take down the application -->
|
||||
<property name="env.init.enabled">false</property>
|
||||
<property name="namespace.cleanup.enabled">false</property>
|
||||
</extension>
|
||||
|
||||
</arquillian>
|
||||
|
||||
@@ -4,10 +4,6 @@
|
||||
|
||||
<extension qualifier="kubernetes">
|
||||
<property name="namespace.use.existing">default</property>
|
||||
|
||||
<!-- Make sure Arquillian Cube does not make any modification to the environment -->
|
||||
<property name="env.init.enabled">false</property>
|
||||
<property name="namespace.cleanup.enabled">false</property>
|
||||
</extension>
|
||||
|
||||
</arquillian>
|
||||
|
||||
Reference in New Issue
Block a user