Test coverage for the entire ACME server implementation: - helpers_test.go: memBarrier, key generation, JWS/EAB signing, test fixtures - nonce_test.go: issue/consume lifecycle, reuse rejection, concurrency - jws_test.go: JWS parsing/verification (ES256, ES384, RS256), JWK parsing, RFC 7638 thumbprints, EAB HMAC verification, key authorization - eab_test.go: EAB credential CRUD, account/order listing - validate_test.go: HTTP-01 challenge validation with httptest servers, authorization/order state machine transitions - handlers_test.go: full ACME protocol flow via chi router — directory, nonce, account creation with EAB, order creation, authorization retrieval, challenge triggering, finalize (order-not-ready), cert retrieval/revocation, CSR identifier validation One production change: extract dnsResolver variable in validate.go for DNS-01 test injection (no behavior change). All 60 tests pass with -race. Full project vet and test clean. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
36 lines
933 B
YAML
36 lines
933 B
YAML
services:
|
|
metacrypt:
|
|
build:
|
|
context: ../..
|
|
dockerfile: Dockerfile.api
|
|
container_name: metacrypt
|
|
restart: unless-stopped
|
|
# Run as root inside container — rootless podman maps this to the
|
|
# host user (kyle), so files in /srv/metacrypt/ are accessible.
|
|
user: "0:0"
|
|
ports:
|
|
- "127.0.0.1:18443:8443"
|
|
- "127.0.0.1:19443:9443"
|
|
volumes:
|
|
- /srv/metacrypt:/srv/metacrypt
|
|
healthcheck:
|
|
test: ["CMD", "metacrypt", "status", "--addr", "https://localhost:8443", "--ca-cert", "/srv/metacrypt/certs/ca.pem"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
metacrypt-web:
|
|
build:
|
|
context: ../..
|
|
dockerfile: Dockerfile.web
|
|
container_name: metacrypt-web
|
|
restart: unless-stopped
|
|
user: "0:0"
|
|
ports:
|
|
- "127.0.0.1:18080:8080"
|
|
volumes:
|
|
- /srv/metacrypt:/srv/metacrypt
|
|
depends_on:
|
|
- metacrypt
|