refactor: move stack assets and wire in mailhog

This commit is contained in:
2025-10-29 05:56:27 -05:00
parent 8f37c46310
commit 7061fbb2a9
41 changed files with 217 additions and 251 deletions

View File

@@ -0,0 +1,48 @@
#!/bin/bash
# Unit test for docker-socket-proxy component
# Following TDD: Write test → Execute test → Test fails → Write minimal code to pass test
set -e
# Load environment settings
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
ENV_FILE="${SCRIPT_DIR}/TSYSDevStack-SupportStack-Demo-Settings"
if [ ! -f "$ENV_FILE" ]; then
echo "Error: Environment settings file not found at $ENV_FILE"
exit 1
fi
source "$ENV_FILE"
# Test function to validate docker-socket-proxy
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
# Additional tests can be added here to validate the proxy functionality
# For example, testing if it can access the Docker socket and respond appropriately
echo "✓ Basic docker-socket-proxy test passed"
return 0
}
# Execute the test
if test_docker_socket_proxy; then
echo "✓ docker-socket-proxy test PASSED"
exit 0
else
echo "✗ docker-socket-proxy test FAILED"
exit 1
fi