diff --git a/testing/gitlab_test.sh b/testing/gitlab_test.sh index 6df8208666c5ce344a2c3d531027290da271bd09..8ce6b51f86676d54f807a2171f68c39b231b2d3c 100755 --- a/testing/gitlab_test.sh +++ b/testing/gitlab_test.sh @@ -40,7 +40,6 @@ docker stack deploy -c ../docker-compose.emg.yml -c ../docker-compose.emg.dev.ym # installing the requirments apk update && apk add bash postgresql-dev gcc g++ python3 python3-dev musl-dev py-pip libffi-dev openssl-dev make gdal==3.1.4-r0 gdal-dev==3.1.4-r0 -gdalinfo --version pip3 install -r requirements.txt ./docker-stack-wait.sh -n renderer -n registrar -n preprocessor -n ingestor -n sftp emg-pvs diff --git a/testing/preprocessor_test.py b/testing/preprocessor_test.py index b9d66b16f52d0c2caa03ba72f60d62b7e7b9cecb..289e4ae557bd3b1b8d832e030dc67d58ec557e6c 100644 --- a/testing/preprocessor_test.py +++ b/testing/preprocessor_test.py @@ -1,17 +1,23 @@ import os import sys - +import re from osgeo import gdal + + + def set_gdal_swift_auth(): + with open('preprocessor_test.txt','r') as auth_values: + values_list = [] + for aline in auth_values: + + x = re.search("(?:=)(.*)", aline) + values_list.append(x.group(1)) - storage_url=os.environ['SWIFT_STORAGE_URL'] - auth_token=os.environ['SWIFT_AUTH_TOKEN'] - # setting gdal config - gdal.SetConfigOption("SWIFT_STORAGE_URL", storage_url) - gdal.SetConfigOption("SWIFT_AUTH_TOKEN", auth_token) + gdal.SetConfigOption("SWIFT_STORAGE_URL", values_list[0]) + gdal.SetConfigOption("SWIFT_AUTH_TOKEN", values_list[1]) diff --git a/testing/preprocessor_test.sh b/testing/preprocessor_test.sh index 051e387612823208e33c285ce90039278549083d..cd8ae26dce2268ee2d32f4bc50d4018c5209a296 100755 --- a/testing/preprocessor_test.sh +++ b/testing/preprocessor_test.sh @@ -19,13 +19,16 @@ IFS="=" while read key value ; do if [ "$key" = "export OS_STORAGE_URL" ]; then + export SWIFT_STORAGE_URL=$value else export SWIFT_AUTH_TOKEN=$value fi done < preprocessor_test.txt +cat preprocessor_test.txt +printenv while read product; do echo $product # preprocessing the images and save the results in the result bucket