Files
aitbc/tests/cli-test-v1-prefix.sh
aitbc 83ca64f7b8
Some checks failed
API Endpoint Tests / test-api-endpoints (push) Has been cancelled
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Production Tests / Production Integration Tests (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
CLI Tests / test-cli (push) Failing after 3s
feat: add /v1 API prefix to all business logic endpoints and create CLI test suite
- Added /v1 prefix to all business logic routers in coordinator-api (analytics, portfolio, reputation, rewards, staking)
- Updated agent-coordinator to include /v1 prefix for all routers
- Changed agent-management API prefix from /api/v1 to /v1
- Updated api-gateway service prefixes to include /v1 for all proxied services
- Fixed coordinator-api routers to use correct service imports (AgentServiceMarketplace instead
2026-05-19 12:46:59 +02:00

99 lines
2.6 KiB
Bash
Executable File

#!/bin/bash
# /v1 Prefix Verification Script
# Verify /v1 prefix on all updated service endpoints
echo "=== /v1 Prefix Verification ==="
echo "Testing /v1 prefix on updated service endpoints..."
echo ""
failed_endpoints=()
# Test coordinator-api (port 8011)
echo -n "coordinator-api /v1/jobs... "
if curl -s http://localhost:8011/v1/jobs > /dev/null; then
echo "✓"
else
echo "✗"
failed_endpoints+=("coordinator-api /v1/jobs")
fi
echo -n "coordinator-api /v1/miners... "
if curl -s http://localhost:8011/v1/miners > /dev/null; then
echo "✓"
else
echo "✗"
failed_endpoints+=("coordinator-api /v1/miners")
fi
# Test agent-coordinator (port 9001)
echo -n "agent-coordinator /v1/health... "
if curl -s http://localhost:9001/v1/health > /dev/null; then
echo "✓"
else
echo "✗"
failed_endpoints+=("agent-coordinator /v1/health")
fi
echo -n "agent-coordinator /v1/agents/discover... "
if curl -s http://localhost:9001/v1/agents/discover -X POST -H "Content-Type: application/json" -d '{}' > /dev/null; then
echo "✓"
else
echo "✗"
failed_endpoints+=("agent-coordinator /v1/agents/discover")
fi
# Test marketplace-service (port 8102)
echo -n "marketplace-service /v1/marketplace/offers... "
if curl -s http://localhost:8102/v1/marketplace/offers > /dev/null; then
echo "✓"
else
echo "✗"
failed_endpoints+=("marketplace-service /v1/marketplace/offers")
fi
echo -n "marketplace-service /v1/marketplace/status... "
if curl -s http://localhost:8102/v1/marketplace/status > /dev/null; then
echo "✓"
else
echo "✗"
failed_endpoints+=("marketplace-service /v1/marketplace/status")
fi
# Test governance-service (port 8105)
echo -n "governance-service /v1/governance/status... "
if curl -s http://localhost:8105/v1/governance/status > /dev/null; then
echo "✓"
else
echo "✗"
failed_endpoints+=("governance-service /v1/governance/status")
fi
# Test trading-service (port 8104)
echo -n "trading-service /v1/trading/status... "
if curl -s http://localhost:8104/v1/trading/status > /dev/null; then
echo "✓"
else
echo "✗"
failed_endpoints+=("trading-service /v1/trading/status")
fi
echo -n "trading-service /v1/blocks... "
if curl -s http://localhost:8104/v1/blocks > /dev/null; then
echo "✓"
else
echo "✗"
failed_endpoints+=("trading-service /v1/blocks")
fi
echo ""
if [ ${#failed_endpoints[@]} -eq 0 ]; then
echo "All /v1 prefix endpoints are responding ✓"
exit 0
else
echo "Failed endpoints:"
for endpoint in "${failed_endpoints[@]}"; do
echo " - $endpoint"
done
exit 1
fi