Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Health head request for download #978

Merged
merged 3 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions sda-download/.github/integration/tests/common/50_check_endpoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@ fi

echo "Health endpoint is ok"

check_health_header=$(curl -o /dev/null -s -w "%{http_code}\n" -LI --cacert certs/ca.pem https://localhost:8443/)

if [ "$check_health_header" != "200" ]; then
echo "Head request to health endpoint does not respond properly"
echo "got: ${check_health_header}"
exit 1
fi

echo "Head method health endpoint is ok"


# ------------------
# Test empty token

Expand Down
1 change: 1 addition & 0 deletions sda-download/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func Setup() *http.Server {
router.HEAD("/s3-encrypted/*path", SelectedMiddleware(), s3.Download)
router.GET("/s3-encrypted/*path", SelectedMiddleware(), s3.Download)
router.GET("/health", healthResponse)
router.HEAD("/", healthResponse)

// Configure TLS settings
log.Info("(3/5) Configuring TLS")
Expand Down
Loading