Running ‘testthat.R’ [2s/103s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > test_check("httptest")
  Loading required package: httptest
  1. Error: We can record a series of requests (@test-capture-requests.R#7) ------
  cannot open URL 'http://httpbin.org/gzip'
  1: capture_requests(path = d, {
         r1 <<- GET("http://httpbin.org/get")
         r2 <<- GET("http://httpbin.org")
         r3 <<- GET("http://httpbin.org/status/418")
         r4 <<- PUT("http://httpbin.org/put")
         r5 <<- GET("http://httpbin.org/response-headers", query = list(`Content-Type` = "application/json"))
         utils::download.file("http://httpbin.org/gzip", tempfile(), quiet = TRUE)
     }) at testthat/test-capture-requests.R:7
  2: eval.parent(expr)
  3: eval(expr, p)
  4: utils::download.file("http://httpbin.org/gzip", tempfile(), quiet = TRUE) at testthat/test-capture-requests.R:14
  
  2. Error: We can record a series of requests (@test-capture-requests.R#7) ------
  object 'status' not found
  1: capture_requests(path = d, {
         r1 <<- GET("http://httpbin.org/get")
         r2 <<- GET("http://httpbin.org")
         r3 <<- GET("http://httpbin.org/status/418")
         r4 <<- PUT("http://httpbin.org/put")
         r5 <<- GET("http://httpbin.org/response-headers", query = list(`Content-Type` = "application/json"))
         utils::download.file("http://httpbin.org/gzip", tempfile(), quiet = TRUE)
     }) at testthat/test-capture-requests.R:7
  2: eval.parent(expr)
  3: eval(expr, p)
  4: utils::download.file("http://httpbin.org/gzip", tempfile(), quiet = TRUE) at testthat/test-capture-requests.R:14
  5: .doTrace({
         if (status == 0) {
             f <- file.path("/tmp/RtmpcwBTFZ/file2cd4e16dda4", buildMockURL(url, method = "DOWNLOAD"))
             dir.create(dirname(f), showWarnings = FALSE, recursive = TRUE)
             file.copy(destfile, f)
         }
     }) at testthat/test-capture-requests.R:14
  6: eval.parent(exprObj)
  7: eval(expr, p)
  8: eval(expr, p)
  
  3. Error: We can then load the mocks it stores (@test-capture-requests.R#48) ---
  Please install xml2 package
  1: expect_identical(content(m1), content(r1)) at testthat/test-capture-requests.R:48
  2: identical(object, expected)
  3: content(m1)
  4: parse_auto(raw, type, encoding, ...)
  5: parser(x = content, type = type, encoding = encoding, ...)
  6: need_package("xml2")
  7: stop("Please install ", pkg, " package", call. = FALSE)
  
  testthat results ================================================================
  OK: 134 SKIPPED: 1 FAILED: 3
  1. Error: We can record a series of requests (@test-capture-requests.R#7) 
  2. Error: We can record a series of requests (@test-capture-requests.R#7) 
  3. Error: We can then load the mocks it stores (@test-capture-requests.R#48) 
  
  Error: testthat unit tests failed
  Execution halted