Running ‘testthat.R’ [6s/241s]
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`.
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (tests-search.R:15:5): simple search w/type argument ──────────────────
  Error: Gateway Timeout (HTTP 504).
  Backtrace:
      █
   1. ├─testthat::expect_true(...) tests-search.R:15:4
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─base::is.data.frame(...)
   5. └─dataverse::dataverse_search(...)
   6.   └─httr::stop_for_status(r, task = httr::content(r)$message)
  
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 104 ]
  Error: Test failures
  Execution halted