Skip to content

Commit f4e151e

Browse files
authored
Merge pull request #139 from RichardLitt/feat/remove-sensitive-data-from-vcr-using-regex
feat: Remove sensitive data from vcr
2 parents 4dcc361 + a80acf4 commit f4e151e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎tests/testthat/helper-vcr.R‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
library("vcr") # *Required* as vcr is set up on loading
22
invisible(vcr::vcr_configure(
33
filter_sensitive_data = list("<<<redacted>>>" = Sys.getenv('EBIRD_KEY')),
4+
# Remove sensitive information about tester from cassettes
5+
filter_sensitive_data_regex = list(
6+
'"ip": "redacted"' = '"ip": "[0-9.]+"',
7+
'"hostname": "redacted"' = '"hostname": "[^"]*"',
8+
'"org": "redacted"' = '"org": "[^"]*"'
9+
),
410
dir = vcr::vcr_test_path("fixtures")
511
))
612
vcr::check_cassette_names()

0 commit comments

Comments
 (0)