@@ -72,29 +72,69 @@ jobs:
7272 exit 1
7373 fi
7474 echo "OpenAPI spec downloaded successfully"
75- head -5 openapi.yml
75+ echo "=== Spec file size ==="
76+ wc -l openapi.yml
77+ echo "=== First 20 lines of spec ==="
78+ head -20 openapi.yml
79+ echo "=== Paths section ==="
80+ grep -A 20 "^paths:" openapi.yml || echo "No paths section found"
81+ echo "=== All path definitions ==="
82+ grep -E "^\s*/" openapi.yml || echo "No path definitions found"
7683
7784 # Start Prism container in background
7885 docker run -d --name prism -p 4010:4010 \
7986 -v $(pwd)/openapi.yml:/tmp/openapi.yml \
8087 stoplight/prism:4 \
8188 mock --host 0.0.0.0 /tmp/openapi.yml
8289
90+ # Check if container started
91+ echo "Checking container status..."
92+ docker ps | grep prism || echo "Container not found in docker ps"
93+ echo "=== Container logs ==="
94+ docker logs prism || echo "No logs available"
95+ echo "=== Container inspection ==="
96+ docker inspect prism | grep -A 10 -B 10 "State" || echo "Could not inspect container"
97+ echo "=== Network ports ==="
98+ docker port prism || echo "Could not get port mappings"
99+
83100 # Wait for Prism to start
84101 echo "Waiting for Prism to start..."
85102 sleep 15
86103
104+ # Test basic connectivity
105+ echo "Testing basic connectivity to localhost:4010..."
106+ curl -v http://localhost:4010 || echo "Basic connection failed"
107+
87108 # Verify Prism is running with retry
88109 for i in {1..5}; do
89- if curl -f http://localhost:4010/health; then
90- echo "Prism container started successfully on port 4010"
110+ echo "=== Attempt $i: Testing Prism health ==="
111+ if curl -v http://localhost:4010/health 2>&1 | head -10; then
112+ echo "✅ Prism container started successfully on port 4010"
91113 break
92114 else
93- echo "Attempt $i: Prism not ready yet, waiting..."
115+ echo "❌ Attempt $i: Prism not ready yet, waiting..."
116+ echo "Container still running?"
117+ docker ps | grep prism || echo "Container stopped"
118+ echo "Recent logs:"
119+ docker logs --tail 5 prism
94120 sleep 5
95121 fi
96122 done
97123
124+ # Test available endpoints
125+ echo "=== Testing available Prism endpoints ==="
126+ echo "Testing root path:"
127+ curl -v http://localhost:4010/ 2>&1 | head -10 || echo "Root path failed"
128+
129+ echo "Testing /v0 path:"
130+ curl -v http://localhost:4010/v0 2>&1 | head -10 || echo "/v0 path failed"
131+
132+ echo "Testing /v0/breeders:"
133+ curl -v http://localhost:4010/v0/breeders 2>&1 | head -10 || echo "/v0/breeders failed"
134+
135+ echo "Testing OpenAPI spec:"
136+ curl -v http://localhost:4010/openapi.json 2>&1 | head -5 || echo "OpenAPI spec failed"
137+
98138 - name : Integration tests against Prism mock
99139 run : |
100140 # Get the binary path
0 commit comments