Running 'testthat.R' [132s]
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(BFS)
  > 
  > test_check("BFS")
   ===>---------------------------   11% |  ETA: 24s
   ======>------------------------   22% |  ETA: 22s
   ==========>--------------------   32% |  ETA: 19s
   ============>------------------   41% |  ETA: 17s
   ================>--------------   52% |  ETA: 14s
   ===================>-----------   62% |  ETA: 11s
   ======================>--------   72% |  ETA:  8s
   =========================>-----   82% |  ETA:  5s
   ============================>--   93% |  ETA:  2s
   ===============>---------------   50% |  ETA:  3s
   ===============>---------------   50% |  ETA:  1s
  [ FAIL 5 | WARN 2 | SKIP 0 | PASS 42 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-bfs_download_asset.R:6:3'): bfs_download_asset() works ─────────
  Error in `curl::curl_download(url = paste0("https://dam-api.bfs.admin.ch/hub/api/dam/assets/", 
      id, "/master"), destfile = destfile, quiet = quiet, mode = mode, 
      handle = handle)`: HTTP error 503.
  Backtrace:
      ▆
   1. └─BFS::bfs_download_asset(number_asset = "24367729", destfile = tmp) at test-bfs_download_asset.R:6:3
   2.   └─curl::curl_download(...)
  ── Error ('test-bfs_get_asset_metadata.R:5:3'): bfs_get_asset_metadata() returns a none-empty list ──
  <httr2_http_503/httr2_http/httr2_error/rlang_error/error/condition>
  Error in `httr2::req_perform(.)`: HTTP 503 Service Unavailable.
  Backtrace:
      ▆
   1. ├─BFS::bfs_get_asset_metadata(number_asset = "24367729") at test-bfs_get_asset_metadata.R:5:3
   2. │ └─... %>% httr2::resp_body_json(simplifyVector = TRUE)
   3. ├─httr2::resp_body_json(., simplifyVector = TRUE)
   4. │ └─httr2:::check_response(resp)
   5. │   └─httr2:::is_response(resp)
   6. └─httr2::req_perform(.)
   7.   └─httr2:::handle_resp(req, resp, error_call = error_call)
   8.     └─httr2:::resp_abort(resp, req, body, call = error_call)
   9.       └─rlang::abort(...)
  ── Error ('test-bfs_get_asset_metadata.R:14:3'): bfs_get_asset_metadata() returns a none-empty list ──
  <httr2_http_503/httr2_http/httr2_error/rlang_error/error/condition>
  Error in `httr2::req_perform(.)`: HTTP 503 Service Unavailable.
  Backtrace:
      ▆
   1. ├─BFS::bfs_get_asset_metadata(number_bfs = "px-x-1502040100_131") at test-bfs_get_asset_metadata.R:14:3
   2. │ └─... %>% httr2::resp_body_json(simplifyVector = TRUE)
   3. ├─httr2::resp_body_json(., simplifyVector = TRUE)
   4. │ └─httr2:::check_response(resp)
   5. │   └─httr2:::is_response(resp)
   6. └─httr2::req_perform(.)
   7.   └─httr2:::handle_resp(req, resp, error_call = error_call)
   8.     └─httr2:::resp_abort(resp, req, body, call = error_call)
   9.       └─rlang::abort(...)
  ── Failure ('test-bfs_get_catalog.R:7:3'): bfs_get_catalog() returns a none-empty data.frame ──
  nrow(df_catalog_data) > 1 is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-bfs_get_catalog_data.R:7:3'): bfs_get_catalog_data() returns a none-empty data.frame ──
  nrow(df_catalog_data) (`actual`) not equal to 40 (`expected`).
  
    `actual`:  0
  `expected`: 40
  
  [ FAIL 5 | WARN 2 | SKIP 0 | PASS 42 ]
  Error: Test failures
  Execution halted