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

Cleanup test teardown

parent 386a73f3
No related branches found
No related tags found
1 merge request!5Add initial attempt at S3 geotiff reading
Pipeline #40006 passed with stages
in 11 minutes and 56 seconds
......@@ -40,13 +40,14 @@ setup_test() {
}
teardown_test() {
kill_test_container || echo "Could not kill test container"
kill_postgres || echo "Could not kill postgres container"
kill_minio || echo "Could not kill minio container"
kill_test_container || debug "Could not kill test container"
kill_postgres || debug "Could not kill postgres container"
kill_minio || debug "Could not kill minio container"
if [ -d $base_tmp_dir ]; then
rm -rf $base_tmp_dir
docker run --rm --name tmpremover -v ${base_tmp_dir}:/dst ${image_url}:${image_tag} bash -c "chmod -R 777 /dst"
rm -rf $base_tmp_dir || debug "Could not remove temporary directory: ${base_tmp_dir}"
fi
docker network rm ${NETWORK_NAME} > /dev/null || echo "Could not remove docker network"
docker network rm ${NETWORK_NAME} > /dev/null || debug "Could not remove docker network"
}
graceful_exit() {
......@@ -92,7 +93,7 @@ start_minio() {
base_dir=$1
base_minio_dir="$1/minio_base"
mkdir -p "${base_minio_dir}"
docker run -d --rm --network ${NETWORK_NAME} -p 9000:9000 -p 9001:9001 --name ${MINIO_SERVER_NAME} --user ${UID}:${UID} -v ${base_minio_dir}:/data minio/minio server /data --console-address ":9001"
docker run -d --rm --network ${NETWORK_NAME} -p 9000:9000 -p 9001:9001 --name ${MINIO_SERVER_NAME} --user $(id -u):$(id -g) -v ${base_minio_dir}:/data minio/minio server /data --console-address ":9001"
create_status=$?
debug "Sleeping for 5 seconds for MinIO to start up..."
sleep 5
......
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