Running ‘testthat.R’ [2s/113s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(kofdata)
  Loading required package: jsonlite
  Loading required package: httr
  > 
  > test_check("kofdata")
  ── 1. Failure: get_dataset works (@test_get_dataset.R#4)  ──────────────────────
  `get_dataset("some_nonexistent_set")` threw an error with unexpected message.
  Expected match: "The API responded"
  Actual message: "Timeout was reached: [datenservice.kof.ethz.ch] Connection timed out after 10001 milliseconds"
  Backtrace:
    1. testthat::expect_error(get_dataset("some_nonexistent_set"), "The API responded")
    6. kofdata::get_dataset("some_nonexistent_set")
    7. httr::GET(url, query = query)
    8. httr:::request_perform(req, hu$handle$handle)
   10. httr:::request_fetch.write_memory(req$output, req$url, handle)
   11. curl::curl_fetch_memory(url, handle = handle)
  
  ── 2. Failure: get_dataset works (@test_get_dataset.R#5)  ──────────────────────
  `get_dataset("set_doesnt_matter", "GandalfTheGray")` threw an error with unexpected message.
  Expected match: "Could not authenticate."
  Actual message: "Timeout was reached: [datenservice.kof.ethz.ch] Connection timed out after 10001 milliseconds"
  Backtrace:
    1. testthat::expect_error(...)
    6. kofdata::get_dataset("set_doesnt_matter", "GandalfTheGray")
    7. httr::GET(url, query = query)
    8. httr:::request_perform(req, hu$handle$handle)
   10. httr:::request_fetch.write_memory(req$output, req$url, handle)
   11. curl::curl_fetch_memory(url, handle = handle)
  
  ── 3. Error: get_dataset works (@test_get_dataset.R#7)  ────────────────────────
  Timeout was reached: [datenservice.kof.ethz.ch] Connection timed out after 10001 milliseconds
  Backtrace:
   1. kofdata::get_dataset("baro_vintages_monthly")
   2. httr::GET(url, query = query)
   3. httr:::request_perform(req, hu$handle$handle)
   5. httr:::request_fetch.write_memory(req$output, req$url, handle)
   6. curl::curl_fetch_memory(url, handle = handle)
  
  ── 4. Error: get_metadata works (@test_get_metadata.R#4)  ──────────────────────
  Timeout was reached: [datenservice.kof.ethz.ch] Connection timed out after 10001 milliseconds
  Backtrace:
    1. testthat::expect_true(is.na(get_metadata("nokey")[["nokey"]]))
    4. kofdata::get_metadata("nokey")
    5. base::lapply(...)
    6. kofdata:::FUN(X[[i]], ...)
    7. httr::GET(url, query = query)
    8. httr:::request_perform(req, hu$handle$handle)
   10. httr:::request_fetch.write_memory(req$output, req$url, handle)
   11. curl::curl_fetch_memory(url, handle = handle)
  
  ── 5. Failure: get_remaining_quota works (@test_get_remaining_quota.R#4)  ──────
  `get_remaining_quota("some_nonexistent_key")` threw an error with unexpected message.
  Expected match: "The API returned a status code of"
  Actual message: "Timeout was reached: [datenservice.kof.ethz.ch] Connection timed out after 10001 milliseconds"
  Backtrace:
    1. testthat::expect_error(...)
    6. kofdata::get_remaining_quota("some_nonexistent_key")
    7. httr::GET(...)
    8. httr:::request_perform(req, hu$handle$handle)
   10. httr:::request_fetch.write_memory(req$output, req$url, handle)
   11. curl::curl_fetch_memory(url, handle = handle)
  
  ── 6. Failure: get_time_series works (@test_get_time_series.R#4)  ──────────────
  `get_time_series("some_nonexistent_key", show_progress = F)` threw an error with unexpected message.
  Expected match: "The API responded"
  Actual message: "Timeout was reached: [datenservice.kof.ethz.ch] Connection timed out after 10001 milliseconds"
  Backtrace:
    1. testthat::expect_error(...)
    6. kofdata::get_time_series("some_nonexistent_key", show_progress = F)
    7. httr::GET(url, query = query)
    8. httr:::request_perform(req, hu$handle$handle)
   10. httr:::request_fetch.write_memory(req$output, req$url, handle)
   11. curl::curl_fetch_memory(url, handle = handle)
  
  ── 7. Failure: get_time_series works (@test_get_time_series.R#5)  ──────────────
  `get_time_series("key_doesnt_matter", "GandalfTheGray", show_progress = F)` threw an error with unexpected message.
  Expected match: "Could not authenticate."
  Actual message: "Timeout was reached: [datenservice.kof.ethz.ch] Connection timed out after 10001 milliseconds"
  Backtrace:
    1. testthat::expect_error(...)
    6. kofdata::get_time_series(...)
    7. httr::GET(url, query = query)
    8. httr:::request_perform(req, hu$handle$handle)
   10. httr:::request_fetch.write_memory(req$output, req$url, handle)
   11. curl::curl_fetch_memory(url, handle = handle)
  
  ── 8. Error: get_time_series works (@test_get_time_series.R#7)  ────────────────
  Timeout was reached: [datenservice.kof.ethz.ch] Connection timed out after 10001 milliseconds
  Backtrace:
   1. kofdata::get_time_series("kofbarometer", show_progress = F)
   2. httr::GET(url, query = query)
   3. httr:::request_perform(req, hu$handle$handle)
   5. httr:::request_fetch.write_memory(req$output, req$url, handle)
   6. curl::curl_fetch_memory(url, handle = handle)
  
  ── 9. Error: list_keys_in_set works (@test_list_keys.R#5)  ─────────────────────
  Timeout was reached: [datenservice.kof.ethz.ch] Connection timed out after 10000 milliseconds
  Backtrace:
   1. kofdata::list_available_sets()
   2. httr::GET(url)
   3. httr:::request_perform(req, hu$handle$handle)
   5. httr:::request_fetch.write_memory(req$output, req$url, handle)
   6. curl::curl_fetch_memory(url, handle = handle)
  
  ── 10. Error: list_public_keys works (@test_list_public_keys.R#5)  ─────────────
  Timeout was reached: [datenservice.kof.ethz.ch] Connection timed out after 10001 milliseconds
  Backtrace:
   1. kofdata::list_public_keys()
   2. httr::GET(url)
   3. httr:::request_perform(req, hu$handle$handle)
   5. httr:::request_fetch.write_memory(req$output, req$url, handle)
   6. curl::curl_fetch_memory(url, handle = handle)
  
  ── 11. Error: list_available_sets works (@test_list_sets.R#5)  ─────────────────
  Timeout was reached: [datenservice.kof.ethz.ch] Connection timed out after 10000 milliseconds
  Backtrace:
   1. kofdata::list_available_sets()
   2. httr::GET(url)
   3. httr:::request_perform(req, hu$handle$handle)
   5. httr:::request_fetch.write_memory(req$output, req$url, handle)
   6. curl::curl_fetch_memory(url, handle = handle)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 0 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 11 ]
  1. Failure: get_dataset works (@test_get_dataset.R#4) 
  2. Failure: get_dataset works (@test_get_dataset.R#5) 
  3. Error: get_dataset works (@test_get_dataset.R#7) 
  4. Error: get_metadata works (@test_get_metadata.R#4) 
  5. Failure: get_remaining_quota works (@test_get_remaining_quota.R#4) 
  6. Failure: get_time_series works (@test_get_time_series.R#4) 
  7. Failure: get_time_series works (@test_get_time_series.R#5) 
  8. Error: get_time_series works (@test_get_time_series.R#7) 
  9. Error: list_keys_in_set works (@test_list_keys.R#5) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted