mirror of
https://github.com/luxfi/consensus.git
synced 2026-09-24 00:26:58 +00:00
The test was failing instead of skipping when port :9090 was either (a) unreachable, or (b) answering with a 404 from a different service. Sub-tests further panicked on nil-interface conversion when status JSON lacked the 'healthy' field. Fixed by: 1. Single up-front probe of /health. If the connection fails OR the response isn't 200, t.Skip the whole suite with a clear message. 2. Guard the 'healthy' bool assertion: skip (not panic) if the field is absent — proves we're talking to a different service. This test is an integration suite that requires `consensus serve` running alongside; it is not a unit test of the engine. With this fix, CI runs that don't spin the server now skip cleanly.