-
Notifications
You must be signed in to change notification settings - Fork 88
CLOUDP-320359: redact snapshot data #3909
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
Conversation
|
Can you update the snapshots and rerun test? |
I was planning on doing it after, but we just got a snapshot update PR that's broken, I'll check that |
|
@fmenezes should we consider merging this as I'm still working on fixing the snapshot other issues? at least we'd have redacted data here |
|
looks like the test |
| X-Mongodb-Service-Version: gitHash=b4fa165bfbcb725abc0816ef770e5f595c0528ce; versionString=master | ||
| X-Permitted-Cross-Domain-Policies: none | ||
|
|
||
| {"linkToken":"[REDACTED]"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can do that or set the content length
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be honest I think content length will be variable so I think you should most likely update it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, i decided to keep the expected length so that we don't need to update/intercept more items than needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if you move your code to maskString it will automatically adjust content length
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool didn't know about maskString, let me try
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated!
|
Coverage Report 📈
|
fmenezes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
Proposed changes
Jira ticket: CLOUDP-320359
Snapshot test:
=== RUN TestLinkToken/Create atlas_e2e_test_generator.go:776: reading snapshot from "/home/runner/work/mongodb-atlas-cli/mongodb-atlas-cli/test/e2e/testdata/.snapshots/TestIdentityProviders/Describe_OIDC_IdP_WORKFORCE#01/GET__api_atlas_v2_federationSettings_656e4d8e91cb7d26db1bc9c6_identityProviders_6821824f9a8a55500612096d_1.snaphost" === RUN TestIdentityProviders/Revoke_JWK_from_OIDC_IdP_WORKFORCE atlas_e2e_test_generator.go:776: reading snapshot from "/home/runner/work/mongodb-atlas-cli/mongodb-atlas-cli/test/e2e/testdata/.snapshots/TestLinkToken/Create/POST__api_atlas_v2_orgs_a0123456789abcdef012345a_liveMigrations_linkTokens_1.snaphost" === RUN TestLinkToken/Delete atlas_e2e_test_generator.go:776: reading snapshot from "/home/runner/work/mongodb-atlas-cli/mongodb-atlas-cli/test/e2e/testdata/.snapshots/TestIdentityProviders/DELETE__api_atlas_v2_federationSettings_656e4d8e91cb7d26db1bc9c6_identityProviders_6821824f9a8a55500612096d_jwks_1.snaphost" === RUN TestIdentityProviders/Delete_OIDC_IdP_WORKFORCE atlas_e2e_test_generator.go:776: reading snapshot from "/home/runner/work/mongodb-atlas-cli/mongodb-atlas-cli/test/e2e/testdata/.snapshots/TestLinkToken/Delete/DELETE__api_atlas_v2_orgs_a0123456789abcdef012345a_liveMigrations_linkTokens_1.snaphost" --- PASS: TestLinkToken (0.42s) --- PASS: TestLinkToken/Create (0.15s) --- PASS: TestLinkToken/Delete (0.13s) PASS ok github.com/mongodb/mongodb-atlas-cli/atlascli/test/e2e/livemigrations 0.422sChecklist
make fmtand formatted my codeFurther comments