Skip to content
Snippets Groups Projects
Verified Commit 957abcfa authored by David Hoese's avatar David Hoese
Browse files

Try implementing some sort of GRB unit test

parent 86af8bdf
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env bash
helm uninstall ${GRB_RELEASE_NAME}
\ No newline at end of file
...@@ -70,16 +70,10 @@ test_basic_grb: ...@@ -70,16 +70,10 @@ test_basic_grb:
extends: .helm_based_job extends: .helm_based_job
stage: test stage: test
script: script:
- ns=$(./helpers/get_namespace.sh) - # need to source to get release name variables for cleanup
- cd geosphere-grb/chart - source ../../ci_tests/run_basic_grb_test.sh
- source cspp-geo-grb/cibuild.env after_script:
- echo "Deploying version $docker_tag to cluster namespace $ns" - ../../ci_tests/cleanup_basic_grb_test.sh
# copy extra values files to the local directory (where helm has access via docker mount)
- cp ../../ci_geosphere/values-grb-g16.yaml .
# namespace names are the same as domain names
- kubectl get all --namespace $ns
- kubectl get all --namespace geosphere
# - helm upgrade -v 2 --install --namespace $ns --set persistence.enabled=true --set persistence.storageClass=longhorn -f values-grb-g16.yaml cspp-geo-grb cspp-geo-grb/
dependencies: dependencies:
- get_chart_grb - get_chart_grb
rules: rules:
......
#!/usr/bin/env bash
debug() {
>&2 echo "DEBUG: $@"
}
error() {
>&2 echo "ERROR: $@"
exit 1
}
set -e
ns=$(./helpers/get_namespace.sh)
cd geosphere-grb/chart
export RELEASE_PREFIX="${CI_JOB_NAME/_/-}-${CI_JOB_ID/_/-}-"
export GRB_RELEASE_NAME="${RELEASE_PREFIX}-cspp-geo-grb"
helm upgrade -v 2 --install --namespace $ns -f ../../ci_tests/values-grb-g16.yaml ${GRB_RELEASE_NAME} cspp-geo-grb/
# give kubernetes a bit to create the pod
sleep 5
GRB_POD_NAME=$(kubectl -n $ns get pods --selector=app.kubernetes.io/instance=${GRB_RELEASE_NAME} -o name)
count=0
while true; do
num_files=$(kubectl exec -n $ns ${GRB_POD_NAME} -- ls -1 /dst/products | wc -l)
let count=count+1
if [[ $num_files -gt 16 ]]; then
debug "Got at least 16 files"
break
fi
if [[ $count -gt 10 ]]; then
error "Took too long for GRB to produce files"
fi
sleep 10
done
...@@ -6,4 +6,9 @@ uploadDst: "/dst" ...@@ -6,4 +6,9 @@ uploadDst: "/dst"
# passwordSecret: "geosphere-rabbit-rabbitmq" # passwordSecret: "geosphere-rabbit-rabbitmq"
caduSender: caduSender:
enabled: true enabled: true
existingClaim: "geosphere-ci-tests-cadu" existingClaim: "geosphere-ci-tests-cadu"
\ No newline at end of file persistence:
enabled: true
storageClass: longhorn
cleanup:
enabled: false
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment