Closed s-espinosa closed 6 years ago
@s-espinosa: I feel like you'll run in to this problem even without checking in cassettes. Everyone would have their own versions locally of the cassettes and eventually the tokens would go stale? Maybe I'm not understanding.
I think having the cassettes checked in is okay, we just need a solution that either mocks the response without a token, or a way to refresh tokens when that happens (similar to record new episodes
)? At first google search: https://blog.element84.com/rails-vcr-tokens.html, this might be a possible solution? I'm not sure where the token goes in these requests.
@notmarkmiranda Can you take a look at this?
Changes
CENSUS_TOKEN
from theapplication.sample.yml
Reasons for Changes
get_token
was already built out, so just needed to change the request to use that token instead of a stored token.CENSUS_TOKEN
in the ENV.Downsides
filter_sensitive_data
inspec/rails_helper.rb
to make sure that the Census tokens are not committed.CENSUS_TOKEN
, so the token gets added to the cassettes.Potential Solution
.gitignore
Let me know what you think.