author | Alberto Bertogli
<albertito@blitiri.com.ar> 2017-07-16 12:24:40 UTC |
committer | Alberto Bertogli
<albertito@blitiri.com.ar> 2017-07-16 12:24:40 UTC |
parent | 5426be5aecad077d977bdc1c3a59e8a59028a43c |
internal/courier/smtp_test.go | +5 | -1 |
diff --git a/internal/courier/smtp_test.go b/internal/courier/smtp_test.go index 7edef1e..c51d691 100644 --- a/internal/courier/smtp_test.go +++ b/internal/courier/smtp_test.go @@ -84,7 +84,11 @@ func TestSMTP(t *testing.T) { // Put a non-existing host first, so we check that if the first host // doesn't work, we try with the rest. - fakeMX["to"] = []string{"nonexistinghost", host} + // The host we use is invalid, to avoid having to do an actual network + // lookup whick makes the test more hermetic. This is a hack, ideally we + // would be able to override the default resolver, but Go does not + // implement that yet. + fakeMX["to"] = []string{":::", host} *smtpPort = port s, tmpDir := newSMTP(t)