Files
Charon/backend
GitHub Actions fc263e7afb fix(tests): eliminate race condition in TestCertificateHandler_Delete_NoBackupService
The test was failing intermittently when run with -race flag due to a race
condition between:
1. CertificateService constructor spawning a background goroutine that
   immediately queries the database
2. The test's HTTP request handler also querying the database

On CI runners, the timing window is wider than on local machines, causing
frequent failures. Solution: Add a 200ms sleep to allow the background
goroutine to complete its initial sync before the test proceeds.

This is acceptable in test code as it mirrors real-world usage where the
service initializes before receiving HTTP requests.

Fixes intermittent failure:
  Error: Not equal: expected: 200, actual: 500
  no such table: ssl_certificates
2025-12-05 05:35:24 +00:00
..
2025-12-02 18:39:07 +00:00
2025-11-24 18:22:01 +00:00

Backend Service

This folder contains the Go API for CaddyProxyManager+.

Prerequisites

  • Go 1.24+

Getting started

cp .env.example .env # optional
cd backend
go run ./cmd/api

Tests

cd backend
go test ./...