Running ‘testthat.R’ [11s/26s]
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(dawaR)
  ## {dawaR} provides data from the Danish Agency of Climate Data
  ## Terms and conditions apply.
  ## Read more at: https://dawadocs.dataforsyningen.dk/dok/om#vilkaar
  > 
  > test_check("dawaR")
  Starting 2 test processes
  [ FAIL 14 | WARN 0 | SKIP 15 | PASS 30 ]
  
  ══ Skipped tests (15) ══════════════════════════════════════════════════════════
  • On CRAN (12): 'test-2-get_data-sections.R:2:3',
    'test-3-get_map_data-sections.R:2:3', 'test-afstemningsomraader.R:3:3',
    'test-get_map_data-kommuner.R:2:3', 'test-get_map_data-politikredse.R:2:3',
    'test-get_map_data-regioner.R:2:3', 'test-get_map_data-vote.R:2:3',
    'test-get_map_data.R:3:3', 'test-status_check.R:20:3',
    'test-status_check.R:20:3', 'test-status_check.R:20:3',
    'test-status_check.R:20:3'
  • connection_check() is not TRUE (3): 'test-autocomplete.R:2:3',
    'test-get_data.R:2:3', 'test-reverse.R:2:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-afstemningsomraader.R:21:3'): Afstemningsomraader autocomplete returns the right answer ──
  Error in `resp_header_exists(resp, "content-type")`: `resp` must be an HTTP response object, not `NULL`.
  Backtrace:
      ▆
   1. └─dawaR:::vote_ac(input = "Dok")
   2.   └─dawaR::autocomplete(section = "afstemningsomraader", input = input)
   3.     └─dawaR::dawa(...)
   4.       └─httr2::resp_content_type(resp)
   5.         └─httr2::resp_header_exists(resp = resp)
   6.           └─httr2:::check_response(resp)
   7.             └─httr2:::stop_input_type(...)
   8.               └─rlang::abort(message, ..., call = call, arg = arg)
  ── Failure ('test-base_api.R:5:3'): API base function properly ─────────────────
  `dawa(section = "supermarked")` did not throw the expected error.
  ── Error ('test-base_api.R:14:3'): API base function properly ──────────────────
  Error in `resp_header_exists(resp, "content-type")`: `resp` must be an HTTP response object, not `NULL`.
  Backtrace:
      ▆
   1. └─dawaR::dawa("sogne", verbose = FALSE) at test-base_api.R:14:3
   2.   └─httr2::resp_content_type(resp)
   3.     └─httr2::resp_header_exists(resp = resp)
   4.       └─httr2:::check_response(resp)
   5.         └─httr2:::stop_input_type(...)
   6.           └─rlang::abort(message, ..., call = call, arg = arg)
  ── Error ('test-get_map_data-postnumre.R:6:3'): Postal code bounding box is the same as regions ──
  Error in `resp_header_exists(resp, "content-type")`: `resp` must be an HTTP response object, not `NULL`.
  Backtrace:
       ▆
    1. ├─sf::st_bbox(dawaR::get_map_data("regioner"), dk) at test-get_map_data-postnumre.R:6:3
    2. └─dawaR::get_map_data("regioner")
    3.   ├─dawaR:::get_map_data_w_cache(type = type, params = params)
    4.   │ ├─base::withVisible(eval(mc, parent.frame()))
    5.   │ └─base::eval(mc, parent.frame())
    6.   │   └─base::eval(mc, parent.frame())
    7.   └─dawaR (local) `<fn>`(type = type, params = params)
    8.     └─dawaR:::get_map_data_nocache(type = type, cache = TRUE, params = params)
    9.       └─dawaR::dawa(...)
   10.         └─httr2::resp_content_type(resp)
   11.           └─httr2::resp_header_exists(resp = resp)
   12.             └─httr2:::check_response(resp)
   13.               └─httr2:::stop_input_type(...)
   14.                 └─rlang::abort(message, ..., call = call, arg = arg)
  ── Failure ('test-status_check.R:16:3'): Status check function parses the rss feed and returns a dataframe if specified ──
  `observed_df` (`actual`) not equal to `expected_df` (`expected`).
  
  `actual$status[[1]]`:   "Down"
  `expected$status[[1]]`: "OK"  
  ── Failure ('test-1-dawa-sections.R:3:5'): All sections are applicable for dawa ──
  Expected `dawa(section = section, per_side = 50)` to run without any errors.
  i Actually got a <rlang_error> with text:
    `resp` must be an HTTP response object, not `NULL`.
  ── Failure ('test-1-dawa-sections.R:3:5'): All sections are applicable for dawa ──
  Expected `dawa(section = section, per_side = 50)` to run without any errors.
  i Actually got a <rlang_error> with text:
    `resp` must be an HTTP response object, not `NULL`.
  ── Failure ('test-1-dawa-sections.R:3:5'): All sections are applicable for dawa ──
  Expected `dawa(section = section, per_side = 50)` to run without any errors.
  i Actually got a <rlang_error> with text:
    `resp` must be an HTTP response object, not `NULL`.
  ── Failure ('test-1-dawa-sections.R:3:5'): All sections are applicable for dawa ──
  Expected `dawa(section = section, per_side = 50)` to run without any errors.
  i Actually got a <rlang_error> with text:
    `resp` must be an HTTP response object, not `NULL`.
  ── Failure ('test-1-dawa-sections.R:3:5'): All sections are applicable for dawa ──
  Expected `dawa(section = section, per_side = 50)` to run without any errors.
  i Actually got a <rlang_error> with text:
    `resp` must be an HTTP response object, not `NULL`.
  ── Failure ('test-1-dawa-sections.R:3:5'): All sections are applicable for dawa ──
  Expected `dawa(section = section, per_side = 50)` to run without any errors.
  i Actually got a <rlang_error> with text:
    `resp` must be an HTTP response object, not `NULL`.
  ── Failure ('test-1-dawa-sections.R:3:5'): All sections are applicable for dawa ──
  Expected `dawa(section = section, per_side = 50)` to run without any errors.
  i Actually got a <rlang_error> with text:
    `resp` must be an HTTP response object, not `NULL`.
  ── Failure ('test-1-dawa-sections.R:3:5'): All sections are applicable for dawa ──
  Expected `dawa(section = section, per_side = 50)` to run without any errors.
  i Actually got a <rlang_error> with text:
    `resp` must be an HTTP response object, not `NULL`.
  ── Failure ('test-1-dawa-sections.R:3:5'): All sections are applicable for dawa ──
  Expected `dawa(section = section, per_side = 50)` to run without any errors.
  i Actually got a <rlang_error> with text:
    `resp` must be an HTTP response object, not `NULL`.
  
  [ FAIL 14 | WARN 0 | SKIP 15 | PASS 30 ]
  Error: Test failures
  Execution halted