docfast/src
OpenClaw Agent 52e9b860cf
All checks were successful
Build & Deploy to Staging / Build & Deploy to Staging (push) Successful in 12m37s
Expand test coverage: Add tests for demo endpoints, URL conversion, PDF options, error handling, and health details
Added comprehensive tests for previously untested areas:

1. Demo Endpoints (no auth):
   - POST /v1/demo/html - converts HTML to watermarked PDF
   - POST /v1/demo/markdown - converts markdown to PDF
   - Rate limiting (5 requests/hour) validation

2. URL to PDF Conversion:
   - Valid URL conversion
   - Missing url field validation
   - SSRF protection (blocks private IPs like 127.0.0.1, localhost)
   - Invalid protocol rejection (ftp://)
   - Invalid URL format handling

3. PDF Options:
   - A3 format conversion
   - Landscape orientation
   - Custom margins

4. Error Handling:
   - Invalid JSON body
   - Wrong Content-Type header (415 expected)
   - Empty HTML string handling

5. Health Endpoint Details:
   - Verify database field presence
   - Verify pool stats (size, active, available)
   - Verify version field

Total tests: 27 (3 passed locally, 24 require Docker/Chrome/DB)
Tests that need Docker to pass: All PDF generation and DB-dependent tests

Note: Local failures are expected without PostgreSQL and Chromium.
CI will run these in Docker with all dependencies.
2026-02-22 07:05:54 +00:00
..
__tests__ Expand test coverage: Add tests for demo endpoints, URL conversion, PDF options, error handling, and health details 2026-02-22 07:05:54 +00:00
middleware fix: disable buildx cache + simplify compression middleware 2026-02-19 08:09:59 +00:00
routes Fix CSP-blocked inline onclick handlers 2026-02-21 16:04:15 +00:00
services feat: complete OpenAPI docs with all Puppeteer PDF options 2026-02-21 13:19:31 +00:00
index.ts Fix CSP-blocked inline onclick handlers 2026-02-21 16:04:15 +00:00
openapi-extra.yaml v0.4.1: Code-driven OpenAPI docs via swagger-jsdoc 2026-02-20 07:54:37 +00:00
swagger.ts feat: complete OpenAPI docs with all Puppeteer PDF options 2026-02-21 13:19:31 +00:00