(t *testing.T)
| 74 | } |
| 75 | |
| 76 | func TestScreenInbound_ScanOffSkips(t *testing.T) { |
| 77 | srv := testScreenServer() |
| 78 | agent := scanOnAgent() |
| 79 | agent.InboundScan = identity.ScanOff |
| 80 | res := srv.screenInbound(context.Background(), agent, "msg_3", "alice@evil.com", |
| 81 | []byte(hiddenInjection), nil, inboundpolicy.Decision{}) |
| 82 | if res.Detected { |
| 83 | t.Errorf("scan=off must not detect; got %+v", res) |
| 84 | } |
| 85 | for _, e := range res.Events { |
| 86 | if e.Source == identity.ScreeningSourceScan { |
| 87 | t.Errorf("scan=off must not produce scan events") |
| 88 | } |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | func TestScreenInbound_GateViolationAudited(t *testing.T) { |
| 93 | srv := testScreenServer() |
nothing calls this directly
no test coverage detected