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

Commit

Permalink
test partial download
Browse files Browse the repository at this point in the history
  • Loading branch information
blankdots committed Dec 14, 2023
1 parent 7dc0905 commit 160430f
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 160430f

Please sign in to comment.