Files
ollama37/tests/testcases/runtime/TC-RUNTIME-003.yml
Shang Chieh Tseng d11140c016 Add GitHub Actions CI/CD pipeline and test framework
- Add .github/workflows/build-test.yml for automated testing
- Add tests/ directory with TypeScript test runner
- Add docs/CICD.md documentation
- Remove .gitlab-ci.yml (migrated to GitHub Actions)
- Update .gitignore for test artifacts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 14:06:44 +08:00

40 lines
1018 B
YAML

id: TC-RUNTIME-003
name: Health Check
suite: runtime
priority: 3
timeout: 180000
dependencies:
- TC-RUNTIME-001
steps:
- name: Wait for health check
command: |
for i in {1..30}; do
STATUS=$(docker inspect ollama37 --format='{{.State.Health.Status}}' 2>/dev/null || echo "starting")
echo "Health status: $STATUS (attempt $i/30)"
if [ "$STATUS" = "healthy" ]; then
echo "Container is healthy"
exit 0
fi
sleep 5
done
echo "Health check timeout"
exit 1
- name: Test API endpoint
command: curl -s http://localhost:11434/api/tags
- name: Check Ollama version
command: docker exec ollama37 ollama --version
criteria: |
Ollama server should be healthy and API responsive.
Expected:
- Container health status becomes "healthy"
- /api/tags endpoint returns JSON response (even if empty models)
- ollama --version shows version information
Accept any valid JSON response from API. Version format may vary.