TestTryFastFailOpen_RespectsFailOpenConfig verifies that when fail-open is not configured, we never fast-path — strict-auth semantics are preserved even if connectorDown is flipped by an earlier failure.
(t *testing.T)
| 285 | // is not configured, we never fast-path — strict-auth semantics are |
| 286 | // preserved even if connectorDown is flipped by an earlier failure. |
| 287 | func TestTryFastFailOpen_RespectsFailOpenConfig(t *testing.T) { |
| 288 | t.Parallel() |
| 289 | fc := &fakeConnector{id: "test"} |
| 290 | s := newTestStrategyWith(t, fc, false /* failOpenEnabled */) |
| 291 | s.markConnectorDown() |
| 292 | assert.Nil(t, s.tryFastFailOpen(), |
| 293 | "must not fast-path when fail-open is disabled — caller must still run real DB path") |
| 294 | } |
| 295 | |
| 296 | // TestTryFastFailOpen_HealthyConnector verifies that with fail-open enabled |
| 297 | // but connector healthy, we return nil (normal DB path). |
nothing calls this directly
no test coverage detected