Skip to content

Commit 8640068

Browse files
authored
acc: Skip utf-8 check for main output file (#2804)
## Why This check originally was added to prevent printing large binary files (e.g. zip files). However, "bundle deploy --debug" can output binary data as well (request and response bodies), causing test failure and not showing the contents, preventing debugging.
1 parent 7bff8bc commit 8640068

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

acceptance/acceptance_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,10 @@ func tryReading(t *testing.T, path string) (string, bool) {
721721
return "", false
722722
}
723723

724-
if !utf8.Valid(data) {
724+
// Do not check output.txt for UTF8 validity, because 'deploy --debug' logs binary request/responses
725+
doUTF8Check := filepath.Base(path) != "output.txt"
726+
727+
if doUTF8Check && !utf8.Valid(data) {
725728
t.Errorf("%s: not valid utf-8", path)
726729
return "", false
727730
}

0 commit comments

Comments
 (0)