forked from epoch8/airflow-exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Factor integration test into dedicated bash script
- Loading branch information
1 parent
721575d
commit db7eb39
Showing
2 changed files
with
21 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
# Integration test that | ||
# 1. Waits for Airflow to come up within 60 seconds | ||
# 2. Ensures the Metrics endpoint returned a valid response | ||
# Depends on Curl | ||
|
||
AIRFLOW_SLEEP_DURATION=70 # Number of seconds to wait for airflow to start | ||
METRICS_ENDPOINT="http://localhost:8080/admin/metrics/" | ||
|
||
# Return nonzero status code if endpoint does not return 200 | ||
CURL_FLAGS="--show-error --fail" | ||
|
||
sleep ${AIRFLOW_SLEEP_DURATION} | ||
curl ${CURL_FLAGS} ${METRICS_ENDPOINT} | ||
|
||
# TODO: validate the contents of the CURLed data |