@@ -80,21 +80,54 @@ jobs:
8080 stoplight/prism:4 \
8181 mock --host 0.0.0.0 /tmp/openapi.yml
8282
83+ # Check if container started
84+ echo "Checking container status..."
85+ docker ps | grep prism || echo "Container not found in docker ps"
86+ echo "=== Container logs ==="
87+ docker logs prism || echo "No logs available"
88+ echo "=== Container inspection ==="
89+ docker inspect prism | grep -A 10 -B 10 "State" || echo "Could not inspect container"
90+ echo "=== Network ports ==="
91+ docker port prism || echo "Could not get port mappings"
92+
8393 # Wait for Prism to start
8494 echo "Waiting for Prism to start..."
8595 sleep 15
8696
97+ # Test basic connectivity
98+ echo "Testing basic connectivity to localhost:4010..."
99+ curl -v http://localhost:4010 || echo "Basic connection failed"
100+
87101 # Verify Prism is running with retry
88102 for i in {1..5}; do
89- if curl -f http://localhost:4010/health; then
90- echo "Prism container started successfully on port 4010"
103+ echo "=== Attempt $i: Testing Prism health ==="
104+ if curl -v http://localhost:4010/health 2>&1 | head -10; then
105+ echo "✅ Prism container started successfully on port 4010"
91106 break
92107 else
93- echo "Attempt $i: Prism not ready yet, waiting..."
108+ echo "❌ Attempt $i: Prism not ready yet, waiting..."
109+ echo "Container still running?"
110+ docker ps | grep prism || echo "Container stopped"
111+ echo "Recent logs:"
112+ docker logs --tail 5 prism
94113 sleep 5
95114 fi
96115 done
97116
117+ # Test available endpoints
118+ echo "=== Testing available Prism endpoints ==="
119+ echo "Testing root path:"
120+ curl -v http://localhost:4010/ 2>&1 | head -10 || echo "Root path failed"
121+
122+ echo "Testing /v0 path:"
123+ curl -v http://localhost:4010/v0 2>&1 | head -10 || echo "/v0 path failed"
124+
125+ echo "Testing /v0/breeders:"
126+ curl -v http://localhost:4010/v0/breeders 2>&1 | head -10 || echo "/v0/breeders failed"
127+
128+ echo "Testing OpenAPI spec:"
129+ curl -v http://localhost:4010/openapi.json 2>&1 | head -5 || echo "OpenAPI spec failed"
130+
98131 - name : Integration tests against Prism mock
99132 run : |
100133 # Get the binary path
0 commit comments