Skip to content

Commit 6cd3414

Browse files
committed
apisix test
1 parent b96ec2d commit 6cd3414

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

.github/workflows/test-apisix.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -195,22 +195,25 @@ jobs:
195195
run: |
196196
START_TIME=$(date +%s)
197197
198-
# In APISIX 3.x, /apisix/admin/info is a supported endpoint
199-
# and returns version and system information.
200-
if curl -s -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" \
201-
http://127.0.0.1:9180/apisix/admin/info | grep -q "version"; then
202-
echo "✓ info endpoint works"
203-
echo "status=passed" >> $GITHUB_OUTPUT
198+
# Use /apisix/admin/server_info, which exists in APISIX 3.8.0
199+
RESPONSE=$(curl -s -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" \
200+
http://127.0.0.1:9180/apisix/admin/server_info)
201+
202+
echo "Server info response: $RESPONSE"
203+
204+
# Basic sanity: response should contain "version"
205+
if echo "$RESPONSE" | grep -q "version"; then
206+
echo "✓ server_info endpoint works"
207+
echo "status=passed" >> $GITHUB_OUTPUT
204208
else
205-
echo "✗ info endpoint failed"
206-
curl -s -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" \
207-
http://127.0.0.1:9180/apisix/admin/info || true
208-
echo "status=failed" >> $GITHUB_OUTPUT
209-
exit 1
209+
echo "✗ server_info endpoint failed"
210+
echo "status=failed" >> $GITHUB_OUTPUT
211+
exit 1
210212
fi
211213
212214
END_TIME=$(date +%s)
213215
echo "duration=$((END_TIME - START_TIME))" >> $GITHUB_OUTPUT
216+
214217
- name: Calculate test summary
215218
if: always()
216219
id: summary

0 commit comments

Comments
 (0)