Sitelet https://web.archive.org/web/20220105182419/https://github.com/cockroachdb/cockroach/issues/72284
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: the test TestAnonymizeStatementsForReporting is overly prescriptive #72284

Open
knz opened this issue Nov 1, 2021 · 2 comments
Open

sql: the test TestAnonymizeStatementsForReporting is overly prescriptive #72284

knz opened this issue Nov 1, 2021 · 2 comments

Comments

@knz
Copy link
Member

@knz knz commented Nov 1, 2021 •

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 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.

@knz
Copy link
Member Author

@knz knz commented Nov 1, 2021

cc @rafiss for triage

@rytaft rytaft removed this from Triage in SQL Queries Nov 2, 2021
@rytaft rytaft added this to Triage in SQL Experience via automation Nov 2, 2021
@rafiss rafiss moved this from Triage to Smaller fixes/improvements in SQL Experience Dec 6, 2021
@grtcoder
Copy link

@grtcoder grtcoder commented Dec 18, 2021

I would like to work on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
SQL Experience
Smaller fixes/improvements
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants