csokun
Unable to instruct ExVCR to records two PUT requests
This is the first time that I am unable to get ExVCR to two PUT records requests. Here is my test setup https://github.com/csokun/ex_azure_storage/blob/lease-blob/test/azure_blob_test.exs#L35-L42
If I uncomment my arrange block, ExVCR record only contains the first PUT request https://github.com/csokun/ex_azure_storage/blob/lease-blob/fixture/azure_blob/acquire_lease_blob_with_setup.json
If I comment arrange block, then ExVCR record my second PUT request https://github.com/csokun/ex_azure_storage/blob/lease-blob/fixture/azure_blob/acquire_lease_blob.json
However, I expect ExVCR to record both requests not sure what I’ve done wrong.
Marked As Solved
csokun
Found out the problem from ExVCR README.
ExVCR uses URL parameter to match request and cassettes. The
urlparameter in the JSON file is taken as regexp string.
In my case, the fix is as simple as adding match_requests_on: [:query] as explained in this example GitHub - parroty/exvcr: HTTP request/response recording library for elixir, inspired by VCR. · GitHub
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #hex
- #security










