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

Function TestSignMessage_NoLookupConfigured

internal/outbound/sender_test.go:116–128  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

114 "hello\r\n"
115
116func TestSignMessage_NoLookupConfigured(t *testing.T) {
117 // Plain NewSender → dkimLookup is nil. Must return (nil, false)
118 // without touching the message — older deployments and unit
119 // tests construct Senders this way and shouldn't break.
120 s := NewSender(nil, "example.com")
121 signed, ok := s.signMessage([]byte(validTestMessage), "example.com")
122 if ok {
123 t.Errorf("ok = true, want false (no lookup configured)")
124 }
125 if signed != nil {
126 t.Errorf("signed = %d bytes, want nil", len(signed))
127 }
128}
129
130func TestSignMessage_EmptyDomainSkipsLookup(t *testing.T) {
131 // A pathological caller passing "" as the signing domain must

Callers

nothing calls this directly

Calls 2

signMessageMethod · 0.95
NewSenderFunction · 0.85

Tested by

no test coverage detected