-
-
Notifications
You must be signed in to change notification settings - Fork 614
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into trust-but-verify-2
- Loading branch information
Showing
33 changed files
with
511 additions
and
819 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -180,13 +180,10 @@ func TestSendNags(t *testing.T) { | |
test.AssertErrorIs(t, err, errNoValidEmail) | ||
test.AssertEquals(t, len(mc.Messages), 0) | ||
|
||
sendLogs := log.GetAllMatching("INFO: attempting send JSON=.*") | ||
sendLogs := log.GetAllMatching("INFO: attempting send for JSON=.*") | ||
if len(sendLogs) != 2 { | ||
t.Errorf("expected 2 'attempting send' log line, got %d: %s", len(sendLogs), strings.Join(sendLogs, "\n")) | ||
} | ||
if !strings.Contains(sendLogs[0], `"Rcpt":["[email protected]"]`) { | ||
t.Errorf("expected first 'attempting send' log line to have one address, got %q", sendLogs[0]) | ||
} | ||
if !strings.Contains(sendLogs[0], `"TruncatedSerials":["000000000000000000000000000000000304"]`) { | ||
t.Errorf("expected first 'attempting send' log line to have one serial, got %q", sendLogs[0]) | ||
} | ||
|
@@ -196,6 +193,9 @@ func TestSendNags(t *testing.T) { | |
if !strings.Contains(sendLogs[0], `"TruncatedDNSNames":["example.com"]`) { | ||
t.Errorf("expected first 'attempting send' log line to have 1 domain, 'example.com', got %q", sendLogs[0]) | ||
} | ||
if strings.Contains(sendLogs[0], `"@gmail.com"`) { | ||
t.Errorf("log line should not contain email address, got %q", sendLogs[0]) | ||
} | ||
} | ||
|
||
func TestSendNagsAddressLimited(t *testing.T) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -473,16 +473,16 @@ func TestMalformedExactBlocklist(t *testing.T) { | |
|
||
func TestValidEmailError(t *testing.T) { | ||
err := ValidEmail("(๑•́ ω •̀๑)") | ||
test.AssertEquals(t, err.Error(), "\"(๑•́ ω •̀๑)\" is not a valid e-mail address") | ||
test.AssertEquals(t, err.Error(), "unable to parse email address") | ||
|
||
err = ValidEmail("[email protected] #replace with real email") | ||
test.AssertEquals(t, err.Error(), "\"[email protected] #replace with real email\" is not a valid e-mail address") | ||
test.AssertEquals(t, err.Error(), "unable to parse email address") | ||
|
||
err = ValidEmail("[email protected]") | ||
test.AssertEquals(t, err.Error(), "invalid contact domain. Contact emails @example.com are forbidden") | ||
test.AssertEquals(t, err.Error(), "contact email has forbidden domain \"example.com\"") | ||
|
||
err = ValidEmail("[email protected]") | ||
test.AssertEquals(t, err.Error(), "contact email \"[email protected]\" has invalid domain : Domain name contains an invalid character") | ||
test.AssertEquals(t, err.Error(), "contact email has invalid domain: Domain name contains an invalid character") | ||
} | ||
|
||
func TestCheckAuthzChallenges(t *testing.T) { | ||
|
Oops, something went wrong.