You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a cassette with two requests in it. The first request is to get back an authorization token, then the second request uses this token to properly authorize. If I filter out the authorization token, the second request gets the placeholder instead and errors out. So, is it possible to send the unredacted information until the cassette is finished, and then filter when writing to the file? Or update the file with placeholders?
The text was updated successfully, but these errors were encountered:
I have also run into this exact issue. My expectation was that filter_sensitive_data is for filtering what is saved to the VCR cassette, but unfortunately it also filters out the response received by the test code.
So if I want to filter out the access token provided by one request like this:
Then I cannot use that accessToken for a followup request within the same test, because the substitution has been done on the response, not only on the VCR cassette.
@davenguyen What did you end up doing for a work around?
For now I am just doing a single request in the test. Generating an access token via a mix task and specifying it as an environment variable when running the tests.
I have a cassette with two requests in it. The first request is to get back an authorization token, then the second request uses this token to properly authorize. If I filter out the authorization token, the second request gets the placeholder instead and errors out. So, is it possible to send the unredacted information until the cassette is finished, and then filter when writing to the file? Or update the file with placeholders?
The text was updated successfully, but these errors were encountered: