GET http://cell-caddy:2019/ returns 404 because Caddy's admin API has no root handler. The health monitor interpreted every response as a failure, restarted Caddy every 3 minutes, and prevented ACME from ever completing. /config/ returns 200 + the running config JSON whenever Caddy is up and serving — that is the correct liveness indicator. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -241,8 +241,8 @@ class TestHealthCheck(unittest.TestCase):
|
||||
mock_get.return_value = MagicMock(status_code=200)
|
||||
self.assertTrue(mgr.check_caddy_health())
|
||||
mock_get.assert_called_once()
|
||||
# URL must be the admin API root
|
||||
self.assertIn('cell-caddy:2019', mock_get.call_args[0][0])
|
||||
# Must hit /config/ — not the root which returns 404
|
||||
self.assertIn('/config/', mock_get.call_args[0][0])
|
||||
|
||||
def test_returns_false_on_connection_error(self):
|
||||
mgr = _mgr()
|
||||
|
||||
Reference in New Issue
Block a user