test: reword misspelled fixtures that trip codespell (#13290)

This commit is contained in:
Chris Lu authored and GitHub committed 2026-12-02 03:21:01 -08:00
1 parent 9f9c28471f
commit 081218bf8a
3 files changed
+7 -7

No files matched your search

+1 -1
View File
@@ -127,7 +127,7 @@ func TestParseConfigurationRejects(t *testing.T) {
{"misspelled filter", queueDoc(`<Queue>arn:aws:sqs:::t</Queue><Event>s3:ObjectCreated:*</Event><Filtr><S3Key>` + filterRule("prefix", "a") + `</S3Key></Filtr>`), s3err.ErrMalformedXML},
{"misspelled s3key", queueDoc(`<Queue>arn:aws:sqs:::t</Queue><Event>s3:ObjectCreated:*</Event><Filter><S3Ky>` + filterRule("prefix", "a") + `</S3Ky></Filter>`), s3err.ErrMalformedXML},
{"misspelled filter rule", filterDoc(`<FiltrRule><Name>prefix</Name><Value>a</Value></FiltrRule>`), s3err.ErrMalformedXML},
{"misspelled value", filterDoc(`<FilterRule><Name>prefix</Name><Valu>private/</Valu></FilterRule>`), s3err.ErrMalformedXML},
{"misspelled value", filterDoc(`<FilterRule><Name>prefix</Name><Val>private/</Val></FilterRule>`), s3err.ErrMalformedXML},
{"topic in a queue rule", queueDoc(`<Queue>arn:aws:sqs:::t</Queue><Topic>arn:aws:sns:::u</Topic><Event>s3:ObjectCreated:*</Event>`), s3err.ErrMalformedXML},
{"no destination", queueDoc(`<Event>s3:ObjectCreated:*</Event>`), s3err.ErrMalformedXML},
{"no event", queueDoc(`<Queue>arn:aws:sqs:::t</Queue>`), s3err.ErrMalformedXML},
+1 -1
View File
@@ -83,7 +83,7 @@ func TestParseTargetsRejects(t *testing.T) {
"name with colon": `{"targets":[{"name":"a:b","type":"topic"}]}`,
"name with slash": `{"targets":[{"name":"a/b","type":"topic"}]}`,
"name too long": `{"targets":[{"name":"` + strings.Repeat("a", 65) + `","type":"topic"}]}`,
"unknown field": `{"targets":[{"name":"a","type":"topic","endpont":"x"}]}`,
"unknown field": `{"targets":[{"name":"a","type":"topic","endpoints":"x"}]}`,
"unknown top field": `{"target":[]}`,
"null target": `{"targets":[null]}`,
"webhook no endpoint": `{"targets":[{"name":"a","type":"webhook"}]}`,
+5 -5
View File
@@ -173,15 +173,15 @@ func TestWriteRecordsContentMd5(t *testing.T) {
}
f := newFile(true)
write(f, 0, "hel")
write(f, 3, "lo")
if got, want := hex.EncodeToString(f.contentMd5()), hex.EncodeToString(util.Md5([]byte("hello"))); got != want {
write(f, 0, "abc")
write(f, 3, "def")
if got, want := hex.EncodeToString(f.contentMd5()), hex.EncodeToString(util.Md5([]byte("abcdef"))); got != want {
t.Errorf("in-order write MD5 = %q", got)
}
f = newFile(true)
write(f, 3, "lo")
write(f, 0, "hel")
write(f, 3, "def")
write(f, 0, "abc")
if f.contentMd5() != nil {
t.Error("out-of-order write got an MD5")
}