From b9a48865c007446b1c340d4b9f83b72d9e9ad173 Mon Sep 17 00:00:00 2001 From: Stefan Negru Date: Fri, 15 Dec 2023 00:45:17 +0200 Subject: [PATCH] test coordinates download --- .../tests/common/50_check_endpoint.sh | 24 +++++++++++++++++++ .../tests/s3notls/52_check_endpoint.sh | 24 +++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/.github/integration/tests/common/50_check_endpoint.sh b/.github/integration/tests/common/50_check_endpoint.sh index 05886a3..edbff75 100755 --- a/.github/integration/tests/common/50_check_endpoint.sh +++ b/.github/integration/tests/common/50_check_endpoint.sh @@ -90,6 +90,30 @@ else echo "Files are different" fi +curl --cacert certs/ca.pem -H "Authorization: Bearer $token" "https://localhost:8443/files/urn:neic:001-002?startCoordinate=0&endCoordinate=2" --output test-part.txt + +echo "TH" > old-part.txt + +cmp --silent old-part.txt test-part.txt +status=$? +if [[ $status = 0 ]]; then + echo "Files are the same" +else + echo "Files are different" +fi + +curl --cacert certs/ca.pem -H "Authorization: Bearer $token" "https://localhost:8443/files/urn:neic:001-002?startCoordinate=7&endCoordinate=14" --output test-part2.txt + +echo "LE IS J" > old-part2.txt + +cmp --silent old-part2.txt test-part2.txt +status=$? +if [[ $status = 0 ]]; then + echo "Files are the same" +else + echo "Files are different" +fi + # ------------------ # Test get visas failed diff --git a/.github/integration/tests/s3notls/52_check_endpoint.sh b/.github/integration/tests/s3notls/52_check_endpoint.sh index d936dbd..b49e0c3 100644 --- a/.github/integration/tests/s3notls/52_check_endpoint.sh +++ b/.github/integration/tests/s3notls/52_check_endpoint.sh @@ -86,6 +86,30 @@ else echo "Files are different" fi +curl -H "Authorization: Bearer $token" "http://localhost:8080/files/urn:neic:001-002?startCoordinate=0&endCoordinate=2" --output test-part.txt + +echo "TH" > old-part.txt + +cmp --silent old-part.txt test-part.txt +status=$? +if [[ $status = 0 ]]; then + echo "Files are the same" +else + echo "Files are different" +fi + +curl -H "Authorization: Bearer $token" "http://localhost:8080/files/urn:neic:001-002?startCoordinate=7&endCoordinate=14" --output test-part2.txt + +echo "LE IS J" > old-part2.txt + +cmp --silent old-part2.txt test-part2.txt +status=$? +if [[ $status = 0 ]]; then + echo "Files are the same" +else + echo "Files are different" +fi + # ------------------ # Test get visas failed