This commit is contained in:
2025-10-28 19:57:51 -05:00
parent 9f17603c1e
commit 65b278e33f
27 changed files with 875 additions and 227 deletions

View File

@@ -0,0 +1,37 @@
#!/bin/bash
# Test to verify WakaAPI is discovered and displayed on homepage
# Following TDD: Write test → Execute test → Test fails → Write minimal code to pass test
set -e
echo "Testing WakaAPI discovery on homepage..."
# Check if WakaAPI container is running
if ! docker ps | grep -q "tsysdevstack-wakaapi"; then
echo "❌ WakaAPI container is not running"
exit 1
fi
# Check if homepage container is running
if ! docker ps | grep -q "tsysdevstack-homepage"; then
echo "❌ Homepage container is not running"
exit 1
fi
# Test if we can access WakaAPI directly
if ! curl -f -s "http://127.0.0.1:4001/" > /dev/null 2>&1; then
echo "❌ WakaAPI is not accessible at http://127.0.0.1:4001"
exit 1
fi
# Check if WakaAPI appears on the homepage
content=$(curl -s http://127.0.0.1:4000/)
if [[ "$content" == *"WakaAPI"* ]] || [[ "$content" == *"wakaapi"* ]] || [[ "$content" == *"wakapi"* ]]; then
echo "✅ WakaAPI is displayed on homepage"
exit 0
else
echo "❌ WakaAPI is NOT displayed on homepage"
echo "Test failed: WakaAPI not discovered by homepage"
exit 1
fi