test: invented artists, albums and MusicBrainz ids in place of real ones
release / web (push) Failing after 1m16s
release / go (push) Successful in 1m48s
release / govulncheck (push) Successful in 20s
release / integration (push) Successful in 4m0s
release / android (push) Successful in 4m34s
release / Build signed APK (push) Successful in 5m9s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Skipped
release / Verify release artifacts (tag releases only) (push) Skipped
release / web (push) Failing after 1m16s
release / go (push) Successful in 1m48s
release / govulncheck (push) Successful in 20s
release / integration (push) Successful in 4m0s
release / android (push) Successful in 4m34s
release / Build signed APK (push) Successful in 5m9s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Skipped
release / Verify release artifacts (tag releases only) (push) Skipped
Test data and example comments named real artists, records and songs, and carried real MusicBrainz ids. One mapping swaps them for invented ones throughout (Fields of Ontario, Plastic Apes, Marlo Davies, ...), keeping what each case tests: sort order, index letter, escaping, title keys, artist-prefix stripping. A test username is no longer the operator's name. The cover-art and Last.fm connection checks still query real releases; they reach live services and need something that exists there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -175,7 +175,7 @@ func composeMessage(cfg dbq.SmtpConfig, to, subject, textBody, htmlBody string)
|
||||
|
||||
// encodeSubject makes subject safe as a header value. Line breaks are
|
||||
// replaced, so a name carried into a subject cannot start a header of its
|
||||
// own, and non-ASCII text ("Moe Shop – WWW") is RFC 2047 encoded, which
|
||||
// own, and non-ASCII text ("Mochi Shop – XYZ") is RFC 2047 encoded, which
|
||||
// mime.QEncoding leaves alone when there is nothing to encode.
|
||||
func encodeSubject(subject string) string {
|
||||
subject = strings.NewReplacer("\r\n", " ", "\r", " ", "\n", " ").Replace(subject)
|
||||
|
||||
@@ -11,11 +11,11 @@ func TestEncodeSubject(t *testing.T) {
|
||||
t.Errorf("plain ASCII changed: %q", got)
|
||||
}
|
||||
|
||||
enc := encodeSubject("Minstrel: Moe Shop – WWW")
|
||||
enc := encodeSubject("Minstrel: Mochi Shop – XYZ")
|
||||
if !strings.HasPrefix(enc, "=?utf-8?q?") {
|
||||
t.Errorf("non-ASCII not RFC 2047 encoded: %q", enc)
|
||||
}
|
||||
if dec, err := new(mime.WordDecoder).DecodeHeader(enc); err != nil || dec != "Minstrel: Moe Shop – WWW" {
|
||||
if dec, err := new(mime.WordDecoder).DecodeHeader(enc); err != nil || dec != "Minstrel: Mochi Shop – XYZ" {
|
||||
t.Errorf("round trip = %q, %v", dec, err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user