Test more things
We can’t trigger an error…
but we can mock or fake them!
Two approaches with vcr
Amending a vcr cassette
vcr::skip_if_vcr_off(). Amending itself:
Easier than starting from scratch!
Say the API need a secret…
What are the secrets your package use? API keys?
Use special accounts for testing if possible.
Where do secrets live? Headers? Files?
Learn how to keep secrets safe, double-check.
Learn how to handle mistakes. (🙊 I recently leaked my own GitHub PAT!)
Secrets & vcr
HTTP testing in R book chapter about security.