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

Add some basic checks for tile gen/mapserver/mapcache

parent 25d28f37
No related branches found
No related tags found
No related merge requests found
......@@ -100,20 +100,43 @@ run_geo2grid_checks() {
}
run_tile_gen_checks() {
count=0
while true; do
num_files=$(kubectl exec -n $ns ${TILEGEN_POD_NAME} -- ls -1 /dst/tiles/g16/abi/radm1/*/*.shp | wc -l || echo 0)
let count=count+1
if [[ $num_files -gt 16 ]]; then
debug "Got at least 16 files ($num_files)"
break
fi
if [[ $count -gt 10 ]]; then
error "Took too long for Geo2Grid to produce files ($num_files so far)"
fi
debug "Found $num_files files, waiting for more..."
sleep 10
done
return 0
}
run_mapserver_checks() {
return 0
# Ex: ["2020-11-24T22:23:19", "2020...
# Get the first element without quotes
first_time=$(curl -s "http://${MAPSERVER_RELEASE_NAME}.${ns}/wms_times/g16/abi/radm1/C01" | head -c 21 | tail -c 19)
# if there aren't any times then we failed
if [ $first_time == "" ]; then
return 1
else
return 0
fi
}
run_mapcache_checks() {
return 0
first_time=$(curl -s "http://${MAPSERVER_RELEASE_NAME}.${ns}/wms_times/g16/abi/radm1/C01" | head -c 21 | tail -c 19)
curl -s "https://${MAPCACHE_RELEASE_NAME}.${ns}/mapcache/wmts/?TIME=${first_time}Z&TILEMATRIXSET=grid_g16_abi_radf_1000m&LAYER=g16_abi_radf_l1b_C01&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2Fpng&TileMatrix=0&TileCol=0&TileRow=0" > /dev/null
}
run_client_checks() {
# just try to load the webpage at all
curl -s "http://${CLIENT_RELEASE_NAME}.${ns}/"
curl -s "http://${CLIENT_RELEASE_NAME}.${ns}/" >/dev/null
}
set -e
......
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