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

Merge branch 'master' into feature-pg-index

# Conflicts:
#	ci/test_mapserver_image.sh
parents e81a9574 666a3011
No related branches found
No related tags found
1 merge request!3Switch to pulling tile index information from postgres server
Pipeline #37041 passed with stages
in 1 minute and 44 seconds
......@@ -11,7 +11,6 @@ variables:
# DOCKER_TLS_CERTDIR: "/certs"
# DOCKER_HOST: "tcp://localhost:2376"
DOCKER_DRIVER: overlay2
HELM_EXPERIMENTAL_OCI: "1"
services:
- docker:19.03.1-dind
......
......@@ -27,10 +27,11 @@ NETWORK_NAME=`basename "$0"`
NETWORK_NAME=${NETWORK_NAME/.sh/}
C01_GTIFF_NAME="GOES-16_ABI_RadF_C01_20220302_194032_GOES-West.tif"
C01_ISOTIME="2022-03-02T19:40:32"
BASE_WORK_DIR=${BASE_WORK_DIR:-${TMPDIR:-/tmp}}
base_tmp_dir="__TOBECREATED__"
setup_test() {
base_tmp_dir=$(mktemp -d ${TMPDIR:-/tmp}/mapserver-tests-XXXXXXX)
base_tmp_dir=$(mktemp -d ${BASE_WORK_DIR}/mapserver-tests-XXXXXXX)
cd "${base_tmp_dir}"
chmod 777 .
echo "Temporary directory: ${base_tmp_dir}"
......@@ -144,8 +145,7 @@ EOF
start_test_container() {
debug "Starting test docker container (${image_url}:${image_tag})..."
docker run --rm -d --network ${NETWORK_NAME} --name test -p 8888:80 -v "$(pwd)":"/data" $@ ${image_url}:${image_tag}
# docker run --rm -it --network ${NETWORK_NAME} --name test -p 8888:80 -v "$(pwd)":"/data" $@ ${image_url}:${image_tag}
docker run --rm -d --network ${NETWORK_NAME} --name test -p 8888:80 $@ ${image_url}:${image_tag}
start_status=$?
# just wait a bit to let the server start
sleep 2
......@@ -153,10 +153,14 @@ start_test_container() {
return $start_status
}
start_shapefile_test_container() {
start_test_container -v "$(pwd)":"/data"
}
start_pg_test_container() {
mkdir pg_secrets
echo "${POSTGRES_PASSWORD}" > pg_secrets/fake_file
start_test_container -v "$(pwd)"/pg_secrets:/secrets -e POSTGRES_HOST=${PG_SERVER_NAME} -e POSTGRES_PORT=${PG_PORT} -e POSTGRES_PASSWORD_FILE="/secrets/fake_file"
start_test_container -v "$(pwd)":"/data" -e POSTGRES_HOST=${PG_SERVER_NAME} -e POSTGRES_PORT=${PG_PORT} -e POSTGRES_PASSWORD_FILE="/data/pg_secrets/fake_file"
}
# start_minio() {
......@@ -197,10 +201,7 @@ curl_index() {
curl_layer_times() {
expected_result=$1
debug "Starting curl basic time request..."
# NOTE: The time doesn't actually exist and no image data is available. A blank image should be returned
# TODO: Verify that the expected time is returned
# time_result=$(curl --fail -sS "http://localhost:8888/wms_times/g16/abi/radf/C01")
time_result=$(curl "http://localhost:8888/wms_times/g16/abi/radf/C01")
time_result=$(curl --fail -sS "http://localhost:8888/wms_times/g16/abi/radf/C01")
time_status=$?
if [[ $time_status -ne 0 ]]; then
error "Requesting layer times failed"
......@@ -271,7 +272,7 @@ EOF
run_basic_shapefile_tests() {
setup_test
debug "Starting shapefile tests..."
start_test_container
start_shapefile_test_container
gtiff_fn="/data/$(create_fake_geotiff)"
add_shapefile_content "${gtiff_fn}"
......
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