Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
add integration tests for coordiantes
Browse files Browse the repository at this point in the history
  • Loading branch information
blankdots committed Jan 2, 2024
1 parent e4bdca3 commit 872b242
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/integration/tests/common/50_check_endpoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
24 changes: 24 additions & 0 deletions .github/integration/tests/s3notls/52_check_endpoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 872b242

Please sign in to comment.