-
Notifications
You must be signed in to change notification settings - Fork 183
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
[Test-Proxy] Consider adding ability to skip recording request body/entire request #2434
Comments
@JoshLove-msft, looks like you already have a PR for this, so assigning to you. |
@scbedd Python Form Recognizer also needs this, should I open a separate issue? |
Nope! It's the same problem. Your +1 is all that's necessary! |
To be clear, the PR that I had linked was implementing this in the .NET Test Framework in its integration with Test Proxy. I can submit a separate PR that adds this feature to the Test Proxy. |
I would really appreciate this Josh, as it's definitely something that the test-proxy needs. If you don't do it, someone (or me) will eventually get around to it 👍 . |
Sure, my thought was to just have another custom header that we include in the request headers to signify that the body should not be recorded. |
Something like |
We should also add the option to avoid recording the entire test - this is useful for teardown scenarios. |
maybe x-recording-mode:
|
In the case of Key Vault, we call For now, I only need to update a few tests and have commented out our old way, but switching everything over to use a non-instrumented client would take quite a while and, so close to release, I'm not keen on risking test coverage. It might be just fine using a non-instrumented client, but will take time to know for sure and we don't have a lot of time. Seems like the ability to stop recording some request/responses would be generally useful as well. |
* Normalize LinkBase for Azure.Core shared files * Revert changes for Azure/azure-sdk-tools#2434 * Compare recorded bodies Seems in the course of creating predictable results, I inadvertently fixed #11634. * Don't enumerate JsonPathSanitizers twice Fixes #27310
* Normalize LinkBase for Azure.Core shared files * Revert changes for Azure/azure-sdk-tools#2434 * Compare recorded bodies Seems in the course of creating predictable results, I inadvertently fixed Azure#11634. * Don't enumerate JsonPathSanitizers twice Fixes Azure#27310
In .NET Test Framework, there is a feature where you can skip recording either an entire request, or a request body. This is useful for large request bodies where the content is not meaningful, e.g. form recognizer has a test where the request body is just an empty pdf. For now, I'm using the Test Framework implementation when using the Test Proxy for now, but we should consider moving this into Test Proxy so all languages can use the feature.
The text was updated successfully, but these errors were encountered: