The expected output in the test TestAnonymizeStatementsForReporting (conn_executor_test.go) is overly prescriptive as to the result of formatting an error containing a redacted statement.
Namely, it has particular requirements about how the stack trace is formatted.
This is unnecessary for the test, which merely needs to assert that the statement is partially redacted. The test should simply assert on the beginning of the error string with strings.HasPrefix.
To Reproduce
Run TestAnonymizeStatementsForReporting on a non-amd64 platform.
Expected behavior
The test passes regardless of platform, and regardless of the particular rendering of stack traces by the errors library.
The text was updated successfully, but these errors were encountered:
Forked from #72227 (initially reported by @amitsadaphule )
Describe the problem
The expected output in the test
TestAnonymizeStatementsForReporting(conn_executor_test.go) is overly prescriptive as to the result of formatting an error containing a redacted statement.Namely, it has particular requirements about how the stack trace is formatted.
This is unnecessary for the test, which merely needs to assert that the statement is partially redacted. The test should simply assert on the beginning of the error string with
strings.HasPrefix.To Reproduce
Run
TestAnonymizeStatementsForReportingon a non-amd64 platform.Expected behavior
The test passes regardless of platform, and regardless of the particular rendering of stack traces by the errors library.
The text was updated successfully, but these errors were encountered: