MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / TestScreenInbound_ScanOffSkips

Function TestScreenInbound_ScanOffSkips

internal/relay/screening_test.go:76–90  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

74}
75
76func 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
92func TestScreenInbound_GateViolationAudited(t *testing.T) {
93 srv := testScreenServer()

Callers

nothing calls this directly

Calls 3

testScreenServerFunction · 0.85
scanOnAgentFunction · 0.85
screenInboundMethod · 0.80

Tested by

no test coverage detected