(t *testing.T)
| 32 | ) |
| 33 | |
| 34 | func TestMsgPipeline_AllToTarget(t *testing.T) { |
| 35 | target := testutils.Target{} |
| 36 | d := MsgPipeline{ |
| 37 | msgpipelineCfg: msgpipelineCfg{ |
| 38 | perSource: map[string]sourceBlock{}, |
| 39 | defaultSource: sourceBlock{ |
| 40 | perRcpt: map[string]*rcptBlock{}, |
| 41 | defaultRcpt: &rcptBlock{ |
| 42 | targets: []module.DeliveryTarget{&target}, |
| 43 | }, |
| 44 | }, |
| 45 | }, |
| 46 | Log: testutils.Logger(t, "msgpipeline"), |
| 47 | } |
| 48 | |
| 49 | testutils.DoTestDelivery(t, &d, "sender@example.com", []string{"rcpt1@example.com", "rcpt2@example.com"}) |
| 50 | |
| 51 | if len(target.Messages) != 1 { |
| 52 | t.Fatalf("wrong amount of messages received, want %d, got %d", 1, len(target.Messages)) |
| 53 | } |
| 54 | |
| 55 | testutils.CheckTestMessage(t, &target, 0, "sender@example.com", []string{"rcpt1@example.com", "rcpt2@example.com"}) |
| 56 | } |
| 57 | |
| 58 | func TestMsgPipeline_PerSourceDomainSplit(t *testing.T) { |
| 59 | orgTarget, comTarget := testutils.Target{InstName: "orgTarget"}, testutils.Target{InstName: "comTarget"} |
nothing calls this directly
no test coverage detected