snapshot
This commit is contained in:
@@ -7,8 +7,7 @@ set -e
|
||||
|
||||
# Load environment settings
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
CONFIG_DIR="${SCRIPT_DIR}/config"
|
||||
ENV_FILE="${CONFIG_DIR}/TSYSDevStack-SupportStack-Demo-Settings"
|
||||
ENV_FILE="${SCRIPT_DIR}/TSYSDevStack-SupportStack-Demo-Settings"
|
||||
|
||||
if [ ! -f "$ENV_FILE" ]; then
|
||||
echo "Error: Environment settings file not found at $ENV_FILE"
|
||||
@@ -22,10 +21,14 @@ test_docker_socket_proxy() {
|
||||
echo "Testing docker-socket-proxy availability and functionality..."
|
||||
|
||||
# Check if the container exists and is running
|
||||
echo "Looking for container: $DOCKER_SOCKET_PROXY_NAME"
|
||||
if docker ps | grep -q "$DOCKER_SOCKET_PROXY_NAME"; then
|
||||
echo "✓ docker-socket-proxy container is running"
|
||||
else
|
||||
echo "✗ docker-socket-proxy container is NOT running"
|
||||
# Check if another container with similar name is running
|
||||
echo "Checking all containers:"
|
||||
docker ps | grep -i docker
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -7,8 +7,7 @@ set -e
|
||||
|
||||
# Load environment settings
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
CONFIG_DIR="${SCRIPT_DIR}/config"
|
||||
ENV_FILE="${CONFIG_DIR}/TSYSDevStack-SupportStack-Demo-Settings"
|
||||
ENV_FILE="${SCRIPT_DIR}/TSYSDevStack-SupportStack-Demo-Settings"
|
||||
|
||||
if [ ! -f "$ENV_FILE" ]; then
|
||||
echo "Error: Environment settings file not found at $ENV_FILE"
|
||||
|
||||
@@ -7,8 +7,7 @@ set -e
|
||||
|
||||
# Load environment settings
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
CONFIG_DIR="${SCRIPT_DIR}/config"
|
||||
ENV_FILE="${CONFIG_DIR}/TSYSDevStack-SupportStack-Demo-Settings"
|
||||
ENV_FILE="${SCRIPT_DIR}/TSYSDevStack-SupportStack-Demo-Settings"
|
||||
|
||||
if [ ! -f "$ENV_FILE" ]; then
|
||||
echo "Error: Environment settings file not found at $ENV_FILE"
|
||||
|
||||
37
artifacts/SupportStack/tests/test_wakaapi_discovery.sh
Executable file
37
artifacts/SupportStack/tests/test_wakaapi_discovery.sh
Executable 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
|
||||
Reference in New Issue
Block a user