-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mock writing to disk #57
Milestone
Comments
sckott
added a commit
that referenced
this issue
Feb 9, 2019
StubbedRequest modifications: allow to_return response body to accept a file connection add mocking writing egs to stub_request FIXME: still not quite done as file(<filename>) doesnt work with httr if the file already has content in it - see to_file() fxn in stub_request egs fixes to to_raise in StubbedRequest to handle exception passing add StubbedRequest tests for to_timeout and to_raise
sckott
added a commit
that referenced
this issue
Feb 9, 2019
two different uses: write to a file "manually" and then do mocked request or use special fxn mock_file() to give file path and content to go in the file examples added FIXME: still need to add tests FIXME: still need to integrate with vcr
sckott
added a commit
that referenced
this issue
Jul 24, 2019
sckott
added a commit
to ropensci/rnoaa
that referenced
this issue
Jul 26, 2019
sckott
added a commit
that referenced
this issue
Dec 3, 2019
Merged
sckott
added a commit
to ropensci/rnoaa
that referenced
this issue
Mar 23, 2020
* #290 - working on integrating vcr handling writing to disk, not done yet related: ropensci/vcr#81 ropensci/webmockr#57 * playing with buoy tests, check back in #FIXME * cpc_prcp test tweaks * man file updates * arc2 fixes, use new write to disk setup * #290 writing to disk work, not done yet * fixes for lcd and isd tests that also cache files * fixed some tests #290 * fix storms test * use relative paths with new vcr version * move write to disk files to inst/ - test check on travis | ropensci/vcr#164 * try commenting out deleting user cached files for ersst tests * comment out one ersst test, does it work now? * try ersst tests each with different file on disk - was previously using the same file perhaps that was leading to failure if e.g. file was opened but not closed before next test ran amybe * remove .Rinstignore, and try inst/test_files in .Rbuildignore if it works on travis * remove inst/test_files from rbuildignore * move test files back to tests/files/ * add .Rinstignore for ignoring test on disk files * woops, needed to fix write_disk_path
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Info
for each of
curl
,crul
,httr
via
curl::curl_fetch_disk()
forcurl
,disk = TRUE
forcrul
andhttr::write_disk()
forhttr
the latter two build on top of the first.
for each of these, if the user writes to disk, the
$content
slot is:rather than what
$content
normally is: class rawApproach
to_return()
not specified, then all is good, nothing different from normal,$content
is length 0body
into_return()
IS specified, user must give a connection object with a file path that alraedy exists (avoid allowing a file path as a string so we don't have to worry about strings. vs. files)e.g.
Need to change internals of
StubbedRequest
body parsing to allow thisrelates to ropensci/vcr#81
The text was updated successfully, but these errors were encountered: