Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library("testthat")
  > library("dataverse")
  > 
  > if (!requireNamespace("yaml", quietly = TRUE)) {
  +   warning("The 'yaml' package must be present to test the dataverse package.")
  + } else if (!requireNamespace("checkmate", quietly = TRUE)) {
  +   warning("The 'checkmate' package must be present to test the dataverse package.")
  + } else {
  +   server  <- Sys.getenv("DATAVERSE_SERVER")
  +   key     <- Sys.getenv("DATAVERSE_KEY")
  + 
  +   if (server == "" | key == "") {
  +     config  <- yaml::read_yaml(system.file("constants.yml", package="dataverse"))
  +     # config  <- yaml::read_yaml("inst/constants.yml")
  + 
  +     Sys.setenv("DATAVERSE_SERVER" = config$server)
  +     Sys.setenv("DATAVERSE_KEY"    = config$api_token)
  + 
  +     if (as.Date(config$api_token_expiration) < Sys.Date()) {
  +       stop(
  +         "The API token expired on `",
  +         config$api_token_expiration,
  +         "`, so the tests would probably fail.  ",
  +         "Please regenerate a new token and update `inst/constants.yml`"
  +       )
  +     }
  +     rm(config)
  +   }
  +   rm(server, key)
  + 
  +   message("Using Dataverse server `", Sys.getenv("DATAVERSE_SERVER"), "`.")
  + 
  +   test_check("dataverse")
  + }
  Using Dataverse server `demo.dataverse.org`.
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  ● On CRAN (32)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (tests-get_file.R:54:3): More informative error message when file does not exist ──
  Error: SSL certificate problem: certificate has expired
  Backtrace:
       █
    1. ├─testthat::expect_error(...) tests-get_file.R:54:2
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat:::.capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. └─dataverse::get_file(2972336, server = "demo.dataverse.org")
    8.   └─dataverse::get_file_by_id(...)
    9.     └─httr::GET(...)
   10.       └─httr:::request_perform(req, hu$handle$handle)
   11.         ├─httr:::request_fetch(req$output, req$url, handle)
   12.         └─httr:::request_fetch.write_memory(req$output, req$url, handle)
   13.           └─curl::curl_fetch_memory(url, handle = handle)
  
  [ FAIL 1 | WARN 0 | SKIP 32 | PASS 3 ]
  Error: Test failures
  Execution halted