Running ‘testthat.R’ [22s/29s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(gutenbergr)
  gutenbergr: using session (temporary) cache
    cache directory: /tmp/Rtmp7VF1lz/gutenbergr_cache
  > 
  > test_check("gutenbergr")
  [ FAIL 4 | WARN 0 | SKIP 6 | PASS 113 ]
  
  ══ Skipped tests (6) ═══════════════════════════════════════════════════════════
  • Integration tests not enabled. Set RUN_INTEGRATION_TESTS=true to run. (6):
    'test-integration-gutenberg_api.R:2:3',
    'test-integration-gutenberg_api.R:25:3',
    'test-integration-gutenberg_api.R:48:3',
    'test-integration-gutenberg_api.R:72:3',
    'test-integration-gutenberg_api.R:96:3',
    'test-integration-gutenberg_api.R:127:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-gutenberg_download.R:57:5'): gutenberg_download actually caches a file ──
  Error in `resp_body_raw(resp)`: Can't retrieve empty body.
  Backtrace:
       ▆
    1. ├─gutenbergr:::with_gutenberg_cache(...) at test-gutenberg_download.R:49:3
    2. │ └─base::force(code) at ./helper-cache.R:21:3
    3. └─gutenbergr::gutenberg_download(109, use_cache = TRUE, strip = FALSE) at test-gutenberg_download.R:57:5
    4.   ├─gutenbergr:::gutenberg_url(gutenberg_id, mirror, verbose)
    5.   │ └─mirror %||% gutenberg_get_mirror(verbose = verbose)
    6.   └─gutenbergr::gutenberg_get_mirror(verbose = verbose)
    7.     └─gutenbergr::gutenberg_get_all_mirrors()
    8.       └─(purrr::quietly(read_md_table))(...)
    9.         ├─purrr:::capture_output(.f(...))
   10.         │ └─base::withCallingHandlers(code, warning = wHandler, message = mHandler)
   11.         └─readMDTable (local) .f(...)
   12.           └─readMDTable:::source_file(file)
   13.             └─httr2::resp_body_string(...)
   14.               └─httr2::resp_body_raw(resp)
   15.                 └─cli::cli_abort("Can't retrieve empty body.")
   16.                   └─rlang::abort(...)
  ── Error ('test-gutenberg_mirrors.R:4:3'): gutenberg_get_mirror works with no option set ──
  Error in `resp_body_raw(resp)`: Can't retrieve empty body.
  Backtrace:
       ▆
    1. ├─testthat::expect_message(...) at test-gutenberg_mirrors.R:4:3
    2. │ └─testthat:::expect_condition_matching_(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─testthat::expect_identical(gutenberg_get_mirror(), "https://aleph.pglaf.org")
    8. │ └─testthat::quasi_label(enquo(object), label)
    9. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   10. └─gutenbergr::gutenberg_get_mirror()
   11.   └─gutenbergr::gutenberg_get_all_mirrors()
   12.     └─(purrr::quietly(read_md_table))(...)
   13.       ├─purrr:::capture_output(.f(...))
   14.       │ └─base::withCallingHandlers(code, warning = wHandler, message = mHandler)
   15.       └─readMDTable (local) .f(...)
   16.         └─readMDTable:::source_file(file)
   17.           └─httr2::resp_body_string(...)
   18.             └─httr2::resp_body_raw(resp)
   19.               └─cli::cli_abort("Can't retrieve empty body.")
   20.                 └─rlang::abort(...)
  ── Error ('test-gutenberg_mirrors.R:23:3'): gutenberg_get_mirror respects verbose ──
  Error in `resp_body_raw(resp)`: Can't retrieve empty body.
  Backtrace:
       ▆
    1. ├─testthat::expect_no_message(gutenberg_get_mirror(verbose = FALSE)) at test-gutenberg_mirrors.R:23:3
    2. │ └─testthat:::expect_no_(...)
    3. │   └─testthat:::quasi_capture(enquo(object), NULL, capture)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ ├─base::withRestarts(...)
    6. │     │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
    7. │     │ │   └─base (local) doWithOneRestart(return(expr), restart)
    8. │     │ └─base::withCallingHandlers(...)
    9. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   10. └─gutenbergr::gutenberg_get_mirror(verbose = FALSE)
   11.   └─gutenbergr::gutenberg_get_all_mirrors()
   12.     └─(purrr::quietly(read_md_table))(...)
   13.       ├─purrr:::capture_output(.f(...))
   14.       │ └─base::withCallingHandlers(code, warning = wHandler, message = mHandler)
   15.       └─readMDTable (local) .f(...)
   16.         └─readMDTable:::source_file(file)
   17.           └─httr2::resp_body_string(...)
   18.             └─httr2::resp_body_raw(resp)
   19.               └─cli::cli_abort("Can't retrieve empty body.")
   20.                 └─rlang::abort(...)
  ── Error ('test-gutenberg_mirrors.R:37:3'): gutenberg_get_mirror catches bad option ──
  Error in `resp_body_raw(resp)`: Can't retrieve empty body.
  Backtrace:
       ▆
    1. ├─testthat::expect_message(...) at test-gutenberg_mirrors.R:37:3
    2. │ └─testthat:::expect_condition_matching_(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─testthat::expect_message(...)
    8. │ └─testthat:::expect_condition_matching_(...)
    9. │   └─testthat:::quasi_capture(...)
   10. │     ├─testthat (local) .capture(...)
   11. │     │ └─base::withCallingHandlers(...)
   12. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   13. └─gutenbergr::gutenberg_get_mirror()
   14.   └─gutenbergr::gutenberg_get_all_mirrors()
   15.     └─(purrr::quietly(read_md_table))(...)
   16.       ├─purrr:::capture_output(.f(...))
   17.       │ └─base::withCallingHandlers(code, warning = wHandler, message = mHandler)
   18.       └─readMDTable (local) .f(...)
   19.         └─readMDTable:::source_file(file)
   20.           └─httr2::resp_body_string(...)
   21.             └─httr2::resp_body_raw(resp)
   22.               └─cli::cli_abort("Can't retrieve empty body.")
   23.                 └─rlang::abort(...)
  
  [ FAIL 4 | WARN 0 | SKIP 6 | PASS 113 ]
  Error:
  ! Test failures.
  Execution halted