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

Function TestScreenInbound_Benign

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

Source from the content-addressed store, hash-verified

61}
62
63func TestScreenInbound_Benign(t *testing.T) {
64 srv := testScreenServer()
65 body := "Subject: lunch\r\n\r\nHi, are we still on for lunch tomorrow at noon?"
66 res := srv.screenInbound(context.Background(), scanOnAgent(), "msg_2", "friend@acme.com",
67 []byte(body), nil, inboundpolicy.Decision{})
68 if res.Detected {
69 t.Errorf("benign message flagged as injection: %+v", res)
70 }
71 if len(res.Events) != 0 {
72 t.Errorf("benign message produced events: %+v", res.Events)
73 }
74}
75
76func TestScreenInbound_ScanOffSkips(t *testing.T) {
77 srv := testScreenServer()

Callers

nothing calls this directly

Calls 3

testScreenServerFunction · 0.85
scanOnAgentFunction · 0.85
screenInboundMethod · 0.80

Tested by

no test coverage detected