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

Disable redaction when tests are running #3229

Open
squarejesse opened this issue Jan 2, 2025 · 2 comments
Open

Disable redaction when tests are running #3229

squarejesse opened this issue Jan 2, 2025 · 2 comments

Comments

@squarejesse
Copy link
Contributor

This is not particularly helpful:

Expected: `UiResult{form_blocker=██}
Actual:   `UiResult{form_blocker=██}

It’d be rad if we could detect that we’re running in test, and disable redaction in that case.

Somehow.

@oldergod
Copy link
Member

oldergod commented Jan 6, 2025

I think detecting that we are in a test can be done for Gradle or Junit. I'm not sure then how to change redacted field printing though...

@JakeWharton
Copy link
Collaborator

Seems pretty risky. Would think doing a fun <T : Message<*, *>> assertThat(message: T): Assert<T> that ended up using a non-redacted string representation on failure would be safer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants