about summary refs log tree commit diff stats
path: root/tests_integration
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2026-05-26 09:37:34 +0300
committerAndrew Dolgov <fox@fakecake.org>2026-05-26 09:37:34 +0300
commit9856922b00ac1557f77bba27720cfc31ab73cfaf (patch)
tree8b2ed2876b68c17f012b5ee81e75b06506667dd9 /tests_integration
parent704db45abb32fe2c8f0fa83de67541aa6668c8e8 (diff)
downloadthe-epube-9856922b00ac1557f77bba27720cfc31ab73cfaf.tar.gz
the-epube-9856922b00ac1557f77bba27720cfc31ab73cfaf.tar.xz
add public healthcheck endpoint and fix incorrect path to test data
Diffstat (limited to 'tests_integration')
-rw-r--r--tests_integration/run.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests_integration/run.sh b/tests_integration/run.sh
index df958a3..9508aec 100644
--- a/tests_integration/run.sh
+++ b/tests_integration/run.sh
@@ -146,7 +146,7 @@ log "Step 2/5: Creating database user and database ..."
 # Step 3: Run schema migrations
 log "Step 3/5: Running schema migrations ..."
 
-export EPUBE_BOOKS_DIR="$(pwd)/test_data/books"
+export EPUBE_BOOKS_DIR="$(pwd)/tests_integration/test_data/books"
 export EPUBE_CALIBRE_DB="${EPUBE_BOOKS_DIR}/metadata.db"
 export EPUBE_DB_TYPE=pgsql
 export EPUBE_DB_HOST=localhost
@@ -182,7 +182,7 @@ PHP_SERVER2_PID=$!
 # Wait for PHP server to be ready
 log "Waiting for PHP server 1 to start ..."
 for i in $(seq 1 30); do
-	if curl -s "http://localhost:$PHP_PORT1/" >/dev/null 2>&1; then
+	if curl -fs "http://localhost:$PHP_PORT1/backend.php?op=healthz" >/dev/null 2>&1; then
 		log "PHP server is ready."
 		break
 	fi
@@ -196,7 +196,7 @@ done
 
 log "Waiting for PHP server 2 to start ..."
 for i in $(seq 1 30); do
-	if curl -s "http://localhost:$PHP_PORT2/" >/dev/null 2>&1; then
+	if curl -fs "http://localhost:$PHP_PORT2/backend.php?op=healthz" >/dev/null 2>&1; then
 		log "PHP server is ready."
 		break
 	fi
@@ -209,7 +209,7 @@ for i in $(seq 1 30); do
 done
 
 # curl -vsL "http://localhost:$PHP_PORT1/login.php?op=perform-login&user=test&password=test"
-# curl -vs "http://localhost:$PHP_PORT1/backend.php?op=list"
+# curl -vs "http://localhost:$PHP_PORT1/backend.php?op=healthz"
 
 # Step 5: Run PHPUnit
 log "Step 5/5: Running PHPUnit integration tests ..."