Closed A-Legg closed 4 years ago
I have this problem as well but didn't realise it was due to the requests being made in a different process until I read your issue! Thanks for pointing that out.
After some digging I found a commit that added an undocumented option to persist the settings globally. If you set enable_global_settings: true
in the ExVCR
config, it will now apply the filters.
Personally, I think this should probably default to true
as this problem is quite confusing and I would imagine having the filters applied globally is the expected behaviour.
@Odaeus My apologies for the delayed response, things have been super busy. Awesome find, thanks so much for taking the time!
Environment
Actual behavior
While recording http requests that are made outside of the test process, spawned tasks in this case, the call to
ExVCR.Config.filter_sensitive_data/2
is not filtering out the sensitive data in the cassette.Example test that has a request made in a task during the call to
Vehicles.spawn_task_to_update_info/1
:The information is successfully filtered in all other cassettes.
Expected behavior
All sensitive data is filtered out of the cassette regardless of which process the request originated.