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

Add expected result check for layer time request

parent 78f58c70
No related branches found
No related tags found
No related merge requests found
......@@ -127,10 +127,22 @@ 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
curl --fail -sS "http://localhost:8888/wms_times/g16/abi/radf/C01" >/dev/null
time_result=$(curl --fail -sS "http://localhost:8888/wms_times/g16/abi/radf/C01")
time_status=$?
if [[ $time_status -ne 0 ]]; then
return $time_status
fi
# []
# ["2020-12-25T15:29:25"]
if [[ ${time_result} == $expected_result ]]; then
debug "Time result (${time_result}) was not equal to the expected ${expected_result}"
return 1
fi
}
curl_empty_tile() {
......@@ -145,7 +157,7 @@ run_basic_shapefile_tests() {
debug "Starting shapefile tests..."
start_test_container
curl_index
curl_layer_times
curl_layer_times "[]"
curl_empty_tile
teardown_test
debug "SUCCESS: Shapefile test completed successfully"
......@@ -163,7 +175,7 @@ run_basic_postgres_tests() {
add_postgres_content
curl_index
curl_layer_times
curl_layer_times "[]"
curl_empty_tile
debug "SUCCESS: Postgres test completed successfully"
teardown_test
......
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