Package: dawaR Check: tests New result: ERROR Running ‘testthat.R’ [14s/22s] 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 33 | WARN 0 | SKIP 17 | PASS 7 ] ══ Skipped tests (17) ══════════════════════════════════════════════════════════ • On CRAN (17): 'test-1-dawa-sections.R:2:3', 'test-3-get_map_data-sections.R:3:3', 'test-2-get_data-sections.R:2:3', 'test-base_api.R:8:3', 'test-get_data.R:37:3', 'test-get_map_data-kommuner.R:2:3', 'test-get_map_data-politikredse.R:2:3', 'test-get_map_data-postnumre.R:6:3', 'test-get_map_data-regioner.R:2:3', 'test-get_map_data-vote.R:2:3', 'test-get_map_data.R:2:3', 'test-status_check.R:2:3', 'test-status_check.R:22:3', 'test-status_check.R:22:3', 'test-status_check.R:22:3', 'test-status_check.R:22:3', 'test-reverse.R:35:3' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-afstemningsomraader.R:3:5'): Voting reverse geocode returns information in default format ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(vote_rev(x = 12.58515, y = 55.68324)) at test-afstemningsomraader.R:3:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-afstemningsomraader.R:9:5'): Voting reverse geocode returns information as dataframe ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-afstemningsomraader.R:9:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-afstemningsomraader.R:19:5'): Voting reverse geocode returns information as list ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-afstemningsomraader.R:19:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-afstemningsomraader.R:29:5'): Afstemningsomraader autocomplete returns the right answer for 'Dok' ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(vote_ac(input = "Dok")) at test-afstemningsomraader.R:29:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-afstemningsomraader.R:35:5'): Afstemningsomraader autocomplete returns the right answer for 'Æbel' ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(vote_ac(input = "Æbel")) at test-afstemningsomraader.R:35:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-afstemningsomraader.R:41:5'): Afstemningsomraader autocomplete returns the right answer for 'Røddi' ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(vote_ac(input = "Røddi")) at test-afstemningsomraader.R:41:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-afstemningsomraader.R:47:5'): Afstemningsomraader autocomplete returns the right answer for 'brønder' ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(vote_ac(input = "brønder")) at test-afstemningsomraader.R:47:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-base_api.R:20:5'): Test regioner default ─────────────────────── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(dawa("regioner")) at test-base_api.R:20:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-base_api.R:26:5'): Test regioner no cache ────────────────────── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(dawa("regioner", cache = FALSE)) at test-base_api.R:26:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-get_data.R:3:5'): get_data() returns data and in the proper format ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-get_data.R:2:3 2. │ └─cassette$call_block(...) 3. └─dawaR::get_data("regioner") at test-get_data.R:3:5 4. └─dawaR::dawa(...) ── Error ('test-get_data.R:43:5'): get_data(section = 'kommuner') snapshot ───── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(get_data(section = "kommuner")) at test-get_data.R:43:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-get_data.R:49:5'): get_data(section = 'politikredse') snapshot ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(get_data(section = "politikredse")) at test-get_data.R:49:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-get_data.R:55:5'): get_data(section = 'regioner') snapshot ───── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(get_data(section = "regioner")) at test-get_data.R:55:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:3:5'): Autocomplete returns the right answer for regioner with input Dok ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:3:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:9:5'): Autocomplete returns the right answer for kommuner with input Dok ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:9:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:15:5'): Autocomplete returns the right answer for politikredse with input Dok ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:15:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:21:5'): Autocomplete returns the right answer for afstemningsomraader with input Dok ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:21:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:27:5'): Autocomplete returns the right answer for regioner with input Æbel ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:27:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:33:5'): Autocomplete returns the right answer for kommuner with input Æbel ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:33:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:39:5'): Autocomplete returns the right answer for politikredse with input Æbel ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:39:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:45:5'): Autocomplete returns the right answer for afstemningsomraader with input Æbel ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:45:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:51:5'): Autocomplete returns the right answer for regioner with input Røddi ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:51:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:57:5'): Autocomplete returns the right answer for kommuner with input Røddi ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:57:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:63:5'): Autocomplete returns the right answer for politikredse with input Røddi ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:63:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:69:5'): Autocomplete returns the right answer for afstemningsomraader with input Røddi ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:69:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:75:5'): Autocomplete returns the right answer for regioner with input brønder ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:75:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:81:5'): Autocomplete returns the right answer for kommuner with input brønder ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:81:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:87:5'): Autocomplete returns the right answer for politikredse with input brønder ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:87:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-autocomplete.R:93:5'): Autocomplete returns the right answer for afstemningsomraader with input brønder ── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-autocomplete.R:93:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-reverse.R:3:5'): reverse geocode regioner 1 ──────────────────── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(reverse("regioner", x = 12.58515, y = 55.68324)) at test-reverse.R:3:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-reverse.R:9:5'): reverse geocode afstemningsomraader ─────────── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-reverse.R:9:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-reverse.R:18:5'): reverse geocode regioner 2 ─────────────────── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-reverse.R:18:5 2. └─rlang::cnd_signal(state$error) ── Error ('test-reverse.R:27:5'): reverse geocode politikredse ───────────────── Error in `if (!is.null(resp) && !httr2::resp_is_error(resp) && httr2::resp_content_type(resp) != "application/json") { cli::cli_abort("The API did not return JSON") } else if (!is.null(resp) && !httr2::resp_is_error(resp)) { tryCatch({ return(httr2::resp_body_json(resp)) }, error = function(e) { cli::cli_alert_danger("Failed to parse response: {e$message}") }) }`: missing value where TRUE/FALSE needed Backtrace: ▆ 1. └─testthat::expect_snapshot(...) at test-reverse.R:27:5 2. └─rlang::cnd_signal(state$error) [ FAIL 33 | WARN 0 | SKIP 17 | PASS 7 ] Error: Test failures Execution halted Package: nettskjemar Check: tests New result: ERROR Running ‘spelling.R’ [0s/0s] Running ‘testthat.R’ [7s/7s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > # Load necessary libraries > library(nettskjemar) > library(testthat) > > test_check("nettskjemar") [ FAIL 16 | WARN 0 | SKIP 0 | PASS 88 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-ns-attachment.R:4:5'): ns_get_attachment saves an attachment file ── Error in `httr2::resp_body_raw(resp)`: Can't retrieve empty body. Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-ns-attachment.R:2:3 2. │ └─cassette$call_block(...) 3. ├─nettskjemar:::with_mocked_nettskjema_auth(...) at test-ns-attachment.R:4:5 4. │ └─base::force(expr) at tests/testthat/helpers.R:28:3 5. └─nettskjemar::ns_get_attachment(attachment_id, path = temp_file) 6. ├─base::writeBin(httr2::resp_body_raw(resp), path) 7. └─httr2::resp_body_raw(resp) 8. └─cli::cli_abort("Can't retrieve empty body.") 9. └─rlang::abort(...) ── Error ('test-ns-attachment.R:18:5'): ns_list_form_attachments retrieves metadata ── Error in `split.default(x, g)`: first argument must be a vector Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-ns-attachment.R:17:3 2. │ └─cassette$call_block(...) 3. ├─nettskjemar:::with_mocked_nettskjema_auth(result <- ns_list_form_attachments(form_id)) at test-ns-attachment.R:18:5 4. │ └─base::force(expr) at tests/testthat/helpers.R:28:3 5. └─nettskjemar::ns_list_form_attachments(form_id) 6. └─stats::ave(ids$submissionId, ids$submissionId, FUN = seq_along) 7. ├─base::lapply(split(x, g), FUN) 8. ├─base::split(x, g) 9. └─base::split.default(x, g) ── Error ('test-ns-attachment.R:34:5'): ns_get_form_attachments saves attachments ── Error in `split.default(x, g)`: first argument must be a vector Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-ns-attachment.R:31:3 2. │ └─cassette$call_block(...) 3. ├─nettskjemar:::with_mocked_nettskjema_auth(...) at test-ns-attachment.R:34:5 4. │ └─base::force(expr) at tests/testthat/helpers.R:28:3 5. └─nettskjemar::ns_get_form_attachments(...) 6. └─nettskjemar::ns_list_form_attachments(form_id) 7. └─stats::ave(ids$submissionId, ids$submissionId, FUN = seq_along) 8. ├─base::lapply(split(x, g), FUN) 9. ├─base::split(x, g) 10. └─base::split.default(x, g) ── Error ('test-ns-attachment.R:52:5'): Retrieves submission attachment metadata ── Error in `httr2::resp_body_json(httr2::req_perform(httr2::req_url_path_append(ns_req(), "form", "submission", submission_id)))`: Unexpected content type "NA". • Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-ns-attachment.R:51:3 2. │ └─cassette$call_block(...) 3. ├─nettskjemar:::with_mocked_nettskjema_auth(result <- ns_list_submission_attachments(submission_id)) at test-ns-attachment.R:52:5 4. │ └─base::force(expr) at tests/testthat/helpers.R:28:3 5. └─nettskjemar::ns_list_submission_attachments(submission_id) 6. └─nettskjemar::ns_get_submission(submission_id) 7. └─httr2::resp_body_json(...) 8. └─httr2::resp_check_content_type(...) 9. └─httr2:::check_content_type(...) 10. └─cli::cli_abort(...) 11. └─rlang::abort(...) ── Error ('test-ns-attachment.R:67:5'): ns_get_submission_attachments saves sub attch ── Error in `httr2::resp_body_json(httr2::req_perform(httr2::req_url_path_append(ns_req(), "form", "submission", submission_id)))`: Unexpected content type "NA". • Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-ns-attachment.R:65:3 2. │ └─cassette$call_block(...) 3. ├─nettskjemar:::with_mocked_nettskjema_auth(...) at test-ns-attachment.R:67:5 4. │ └─base::force(expr) at tests/testthat/helpers.R:28:3 5. └─nettskjemar::ns_get_submission_attachments(...) 6. └─nettskjemar::ns_list_submission_attachments(submission_id) 7. └─nettskjemar::ns_get_submission(submission_id) 8. └─httr2::resp_body_json(...) 9. └─httr2::resp_check_content_type(...) 10. └─httr2:::check_content_type(...) 11. └─cli::cli_abort(...) 12. └─rlang::abort(...) ── Error ('test-ns-codebook.R:3:5'): fetches raw codebook correctly ──────────── Error in `httr2::resp_body_json(resp)`: Unexpected content type "NA". • Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-ns-codebook.R:2:3 2. │ └─cassette$call_block(...) 3. ├─nettskjemar:::with_mocked_nettskjema_auth(raw_cb <- get_raw_codebook(form_id)) at test-ns-codebook.R:3:5 4. │ └─base::force(expr) at tests/testthat/helpers.R:28:3 5. └─nettskjemar:::get_raw_codebook(form_id) 6. ├─base::structure(...) 7. └─httr2::resp_body_json(resp) 8. └─httr2::resp_check_content_type(...) 9. └─httr2:::check_content_type(...) 10. └─cli::cli_abort(...) 11. └─rlang::abort(...) ── Failure ('test-ns-codebook.R:15:5'): handles invalid form_id gracefully ───── `get_raw_codebook(100)` threw an error with unexpected message. Expected match: "Not Found" Actual message: "Unexpected content type \"NA\".\n• Expecting type \"application/json\" or suffix \"json\"." Backtrace: ▆ 1. ├─nettskjemar:::with_mocked_nettskjema_auth(...) at test-ns-codebook.R:15:5 2. │ └─base::force(expr) at tests/testthat/helpers.R:28:3 3. ├─testthat::expect_error(get_raw_codebook(100), "Not Found") 4. │ └─testthat:::quasi_capture(...) 5. │ ├─testthat (local) .capture(...) 6. │ │ └─base::withCallingHandlers(...) 7. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 8. └─nettskjemar:::get_raw_codebook(100) 9. ├─base::structure(...) 10. └─httr2::resp_body_json(resp) 11. └─httr2::resp_check_content_type(...) 12. └─httr2:::check_content_type(...) 13. └─cli::cli_abort(...) 14. └─rlang::abort(...) ── Error ('test-ns-codebook.R:24:5'): converts raw to structured ─────────────── Error in `httr2::resp_body_json(resp)`: Unexpected content type "NA". • Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-ns-codebook.R:23:3 2. │ └─cassette$call_block(...) 3. ├─nettskjemar:::with_mocked_nettskjema_auth(cb <- ns_get_codebook(form_id)) at test-ns-codebook.R:24:5 4. │ └─base::force(expr) at tests/testthat/helpers.R:28:3 5. └─nettskjemar::ns_get_codebook(form_id) 6. └─nettskjemar:::get_raw_codebook(form_id = form_id) 7. ├─base::structure(...) 8. └─httr2::resp_body_json(resp) 9. └─httr2::resp_check_content_type(...) 10. └─httr2:::check_content_type(...) 11. └─cli::cli_abort(...) 12. └─rlang::abort(...) ── Error ('test-ns-codebook.R:35:5'): respects asis flag ─────────────────────── Error in `httr2::resp_body_json(resp)`: Unexpected content type "NA". • Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-ns-codebook.R:34:3 2. │ └─cassette$call_block(...) 3. ├─nettskjemar:::with_mocked_nettskjema_auth(...) at test-ns-codebook.R:35:5 4. │ └─base::force(expr) at tests/testthat/helpers.R:28:3 5. └─nettskjemar::ns_get_codebook(form_id, asis = TRUE) 6. └─nettskjemar:::get_raw_codebook(form_id = form_id) 7. ├─base::structure(...) 8. └─httr2::resp_body_json(resp) 9. └─httr2::resp_check_content_type(...) 10. └─httr2:::check_content_type(...) 11. └─cli::cli_abort(...) 12. └─rlang::abort(...) ── Error ('test-ns-form.R:3:5'): test get forms list ─────────────────────────── Error in `httr2::resp_body_json(httr2::req_perform(httr2::req_url_path_append(ns_req(), "form", "me")))`: Unexpected content type "NA". • Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-ns-form.R:2:3 2. │ └─cassette$call_block(...) 3. ├─nettskjemar:::with_mocked_nettskjema_auth(formslist <- ns_get_forms()) at test-ns-form.R:3:5 4. │ └─base::force(expr) at tests/testthat/helpers.R:28:3 5. └─nettskjemar::ns_get_forms() 6. └─httr2::resp_body_json(...) 7. └─httr2::resp_check_content_type(...) 8. └─httr2:::check_content_type(...) 9. └─cli::cli_abort(...) 10. └─rlang::abort(...) ── Error ('test-ns-form.R:36:5'): test get raw forms list ────────────────────── Error in `httr2::resp_body_json(httr2::req_perform(httr2::req_url_path_append(ns_req(), "form", "me")))`: Unexpected content type "NA". • Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-ns-form.R:35:3 2. │ └─cassette$call_block(...) 3. ├─nettskjemar:::with_mocked_nettskjema_auth(formslist_raw <- ns_get_forms(asis = TRUE)) at test-ns-form.R:36:5 4. │ └─base::force(expr) at tests/testthat/helpers.R:28:3 5. └─nettskjemar::ns_get_forms(asis = TRUE) 6. └─httr2::resp_body_json(...) 7. └─httr2::resp_check_content_type(...) 8. └─httr2:::check_content_type(...) 9. └─cli::cli_abort(...) 10. └─rlang::abort(...) ── Error ('test-ns-me.R:3:5'): test user information ─────────────────────────── Error in `httr2::resp_body_json(httr2::req_perform(httr2::req_url_path_append(ns_req(), "me")))`: Unexpected content type "NA". • Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-ns-me.R:2:3 2. │ └─cassette$call_block(...) 3. ├─nettskjemar:::with_mocked_nettskjema_auth(me <- ns_get_me()) at test-ns-me.R:3:5 4. │ └─base::force(expr) at tests/testthat/helpers.R:28:3 5. └─nettskjemar::ns_get_me() 6. └─httr2::resp_body_json(httr2::req_perform(httr2::req_url_path_append(ns_req(), "me"))) 7. └─httr2::resp_check_content_type(...) 8. └─httr2:::check_content_type(...) 9. └─cli::cli_abort(...) 10. └─rlang::abort(...) ── Error ('test-ns-meta.R:3:5'): ns_get_meta for valid input ─────────────────── Error in `httr2::resp_body_json(httr2::req_perform(httr2::req_url_path_append(ns_req(), "form", form_id, "info")))`: Unexpected content type "NA". • Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-ns-meta.R:2:3 2. │ └─cassette$call_block(...) 3. ├─nettskjemar:::with_mocked_nettskjema_auth(meta <- ns_get_meta(form_id)) at test-ns-meta.R:3:5 4. │ └─base::force(expr) at tests/testthat/helpers.R:28:3 5. └─nettskjemar::ns_get_meta(form_id) 6. └─httr2::resp_body_json(...) 7. └─httr2::resp_check_content_type(...) 8. └─httr2:::check_content_type(...) 9. └─cli::cli_abort(...) 10. └─rlang::abort(...) ── Failure ('test-ns-meta.R:26:5'): ns_get_meta invalid form_id ──────────────── `ns_get_meta(100)` threw an error with unexpected message. Expected match: "Not Found" Actual message: "Unexpected content type \"NA\".\n• Expecting type \"application/json\" or suffix \"json\"." Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-ns-meta.R:25:3 2. │ └─cassette$call_block(...) 3. ├─nettskjemar:::with_mocked_nettskjema_auth(...) at test-ns-meta.R:26:5 4. │ └─base::force(expr) at tests/testthat/helpers.R:28:3 5. ├─testthat::expect_error(ns_get_meta(100), "Not Found") 6. │ └─testthat:::quasi_capture(...) 7. │ ├─testthat (local) .capture(...) 8. │ │ └─base::withCallingHandlers(...) 9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 10. └─nettskjemar::ns_get_meta(100) 11. └─httr2::resp_body_json(...) 12. └─httr2::resp_check_content_type(...) 13. └─httr2:::check_content_type(...) 14. └─cli::cli_abort(...) 15. └─rlang::abort(...) ── Error ('test-ns-submission.R:3:5'): ns_get_data retrieves data in original format ── Error in `resp_body_raw(resp)`: Can't retrieve empty body. Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-ns-submission.R:2:3 2. │ └─cassette$call_block(...) 3. ├─nettskjemar:::with_mocked_nettskjema_auth(...) at test-ns-submission.R:3:5 4. │ └─base::force(expr) at tests/testthat/helpers.R:28:3 5. └─nettskjemar::ns_get_data(form_id, type = "original") 6. └─httr2::resp_body_string(...) 7. └─httr2::resp_body_raw(resp) 8. └─cli::cli_abort("Can't retrieve empty body.") 9. └─rlang::abort(...) ── Error ('test-ns-submission.R:16:5'): ns_get_submission retrieves individual submission ── Error in `httr2::resp_body_json(httr2::req_perform(httr2::req_url_path_append(ns_req(), "form", "submission", submission_id)))`: Unexpected content type "NA". • Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-ns-submission.R:15:3 2. │ └─cassette$call_block(...) 3. ├─nettskjemar:::with_mocked_nettskjema_auth(result <- ns_get_submission(submission_id)) at test-ns-submission.R:16:5 4. │ └─base::force(expr) at tests/testthat/helpers.R:28:3 5. └─nettskjemar::ns_get_submission(submission_id) 6. └─httr2::resp_body_json(...) 7. └─httr2::resp_check_content_type(...) 8. └─httr2:::check_content_type(...) 9. └─cli::cli_abort(...) 10. └─rlang::abort(...) [ FAIL 16 | WARN 0 | SKIP 0 | PASS 88 ] Error: Test failures Execution halted Package: nisrarr Check: tests New result: ERROR Running ‘testthat.R’ [3s/3s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library("testthat") > test_check("nisrarr") Loading required package: nisrarr [ FAIL 6 | WARN 0 | SKIP 2 | PASS 7 ] ══ Skipped tests (2) ═══════════════════════════════════════════════════════════ • On CRAN (2): 'test-nisra_df.R:7:3', 'test-nisra_df.R:25:3' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-nisra_data_portal_request.R:3:5'): nisra_data_portal reports application errors ── Error in `resp_body_raw(resp)`: Can't retrieve empty body. Backtrace: ▆ 1. ├─testthat::expect_error(...) at test-nisra_data_portal_request.R:3:5 2. │ └─testthat:::expect_condition_matching(...) 3. │ └─testthat:::quasi_capture(...) 4. │ ├─testthat (local) .capture(...) 5. │ │ └─base::withCallingHandlers(...) 6. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 7. └─nisrarr:::nisra_data_portal("incorrect_method", flush_cache = TRUE) 8. └─httr2::resp_body_string(resp) 9. └─httr2::resp_body_raw(resp) 10. └─cli::cli_abort("Can't retrieve empty body.") 11. └─rlang::abort(...) ── Error ('test-nisra_data_portal_request.R:13:5'): nisra_search finds the right keywords ── Error in `resp_body_raw(resp)`: Can't retrieve empty body. Backtrace: ▆ 1. └─nisrarr::nisra_search(...) at test-nisra_data_portal_request.R:13:5 2. └─nisrarr:::nisra_read_collection(datefrom = datefrom, flush_cache = flush_cache) 3. └─nisrarr:::nisra_data_portal(...) 4. └─httr2::resp_body_string(resp) 5. └─httr2::resp_body_raw(resp) 6. └─cli::cli_abort("Can't retrieve empty body.") 7. └─rlang::abort(...) ── Error ('test-nisra_data_portal_request.R:37:5'): nisra_search checks for dimensions ── Error in `resp_body_raw(resp)`: Can't retrieve empty body. Backtrace: ▆ 1. └─nisrarr::nisra_search(...) at test-nisra_data_portal_request.R:37:5 2. └─nisrarr:::nisra_read_collection(datefrom = datefrom, flush_cache = flush_cache) 3. └─nisrarr:::nisra_data_portal(...) 4. └─httr2::resp_body_string(resp) 5. └─httr2::resp_body_raw(resp) 6. └─cli::cli_abort("Can't retrieve empty body.") 7. └─rlang::abort(...) ── Error ('test-nisra_data_portal_request.R:58:5'): datasets are returned as tibbles ── Error in `resp_body_raw(resp)`: Can't retrieve empty body. Backtrace: ▆ 1. └─nisrarr::nisra_read_dataset("CCMLGD", flush_cache = TRUE) at test-nisra_data_portal_request.R:58:5 2. └─nisrarr:::nisra_data_portal(...) 3. └─httr2::resp_body_string(resp) 4. └─httr2::resp_body_raw(resp) 5. └─cli::cli_abort("Can't retrieve empty body.") 6. └─rlang::abort(...) ── Error ('test-nisra_data_portal_request.R:80:5'): cache is used ────────────── Error in `resp_body_raw(resp)`: Can't retrieve empty body. Backtrace: ▆ 1. └─nisrarr::nisra_read_dataset("CCMLGD", flush_cache = TRUE) at test-nisra_data_portal_request.R:80:5 2. └─nisrarr:::nisra_data_portal(...) 3. └─httr2::resp_body_string(resp) 4. └─httr2::resp_body_raw(resp) 5. └─cli::cli_abort("Can't retrieve empty body.") 6. └─rlang::abort(...) ── Error ('test-nisra_data_portal_request.R:92:5'): message is shown if dataset does not exist ── Error in `resp_body_raw(resp)`: Can't retrieve empty body. Backtrace: ▆ 1. ├─testthat::expect_error(...) at test-nisra_data_portal_request.R:92:5 2. │ └─testthat:::expect_condition_matching(...) 3. │ └─testthat:::quasi_capture(...) 4. │ ├─testthat (local) .capture(...) 5. │ │ └─base::withCallingHandlers(...) 6. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 7. └─nisrarr::nisra_read_dataset("notacode", flush_cache = TRUE) 8. └─nisrarr:::nisra_data_portal(...) 9. └─httr2::resp_body_string(resp) 10. └─httr2::resp_body_raw(resp) 11. └─cli::cli_abort("Can't retrieve empty body.") 12. └─rlang::abort(...) [ FAIL 6 | WARN 0 | SKIP 2 | PASS 7 ] Error: Test failures Execution halted Package: rnpn Check: tests New result: ERROR Running ‘testthat.R’ [10s/16s] 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(rnpn) > > test_check("rnpn") Downloading... Downloading... Downloading... [ FAIL 21 | WARN 0 | SKIP 19 | PASS 11 ] ══ Skipped tests (19) ══════════════════════════════════════════════════════════ • On CRAN (19): 'test-npn-geoserver.R:4:3', 'test-npn-geoserver.R:16:3', 'test-npn-geoserver.R:41:3', 'test-npn-geoserver.R:81:3', 'test-npn-geoserver.R:105:3', 'test-npn-geoserver.R:127:3', 'test-npn-geoserver.R:146:3', 'test-npn-observations.R:8:3', 'test-npn-observations.R:183:3', 'test-npn-observations.R:224:3', 'test-npn-observations.R:268:3', 'test-npn-observations.R:333:3', 'test-npn-observations.R:401:3', 'test-npn-observations.R:470:3', 'test-npn-observations.R:539:3', 'test-npn-observations.R:593:3', 'test-npn-observations.R:645:3', 'test-npn-observations.R:731:3', 'test-npn-observations.R:840:3' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-npn-datasets.R:5:5'): datasets endpoint working ──────────────── Error in `httr2::resp_body_json(resp, simplifyVector = TRUE)`: Unexpected content type "NA". * Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-npn-datasets.R:4:3 2. │ └─cassette$call_block(...) 3. └─rnpn::npn_datasets() at test-npn-datasets.R:5:5 4. └─httr2::resp_body_json(resp, simplifyVector = TRUE) 5. └─httr2::resp_check_content_type(...) 6. └─httr2:::check_content_type(...) 7. └─cli::cli_abort(...) 8. └─rlang::abort(...) ── Error ('test-npn-get-species.R:5:5'): npn_species returns a data frame ────── Error in `httr2::resp_body_json(resp, simplifyVector = TRUE)`: Unexpected content type "NA". * Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-npn-get-species.R:4:3 2. │ └─cassette$call_block(...) 3. └─rnpn::npn_species() at test-npn-get-species.R:5:5 4. └─httr2::resp_body_json(resp, simplifyVector = TRUE) 5. └─httr2::resp_check_content_type(...) 6. └─httr2:::check_content_type(...) 7. └─cli::cli_abort(...) 8. └─rlang::abort(...) ── Error ('test-npn-get-species.R:19:5'): npn_species_id working ─────────────── Error in `httr2::resp_body_json(x, simplifyVector = TRUE)`: Unexpected content type "NA". * Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-npn-get-species.R:18:3 2. │ └─cassette$call_block(...) 3. ├─rnpn::npn_species_id(3) at test-npn-get-species.R:19:5 4. │ └─base::lapply(...) 5. │ └─rnpn (local) FUN(X[[i]], ...) 6. │ ├─httr2::resp_body_json(x, simplifyVector = TRUE) %>% tibble::as_tibble() 7. │ └─httr2::resp_body_json(x, simplifyVector = TRUE) 8. │ └─httr2::resp_check_content_type(...) 9. │ └─httr2:::check_content_type(...) 10. │ └─cli::cli_abort(...) 11. │ └─rlang::abort(...) 12. └─tibble::as_tibble(.) ── Error ('test-npn-get-species.R:30:5'): npn_species_state works ────────────── Error in `httr2::resp_body_json(resp, simplifyVector = TRUE)`: Unexpected content type "NA". * Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-npn-get-species.R:29:3 2. │ └─cassette$call_block(...) 3. └─rnpn::npn_species_state("AZ") at test-npn-get-species.R:30:5 4. └─httr2::resp_body_json(resp, simplifyVector = TRUE) 5. └─httr2::resp_check_content_type(...) 6. └─httr2:::check_content_type(...) 7. └─cli::cli_abort(...) 8. └─rlang::abort(...) ── Error ('test-npn-get-species.R:55:5'): npn_species_search works ───────────── Error in `httr2::resp_body_json(resp, simplifyVector = TRUE)`: Unexpected content type "NA". * Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-npn-get-species.R:54:3 2. │ └─cassette$call_block(...) 3. └─rnpn::npn_species_search(start_date = "2023-01-01", end_date = "2023-05-15") at test-npn-get-species.R:55:5 4. └─httr2::resp_body_json(resp, simplifyVector = TRUE) 5. └─httr2::resp_check_content_type(...) 6. └─httr2:::check_content_type(...) 7. └─cli::cli_abort(...) 8. └─rlang::abort(...) ── Error ('test-npn-get-species.R:81:5'): npn_species_types ──────────────────── Error in `httr2::resp_body_json(resp, simplifyVector = TRUE)`: Unexpected content type "NA". * Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-npn-get-species.R:80:3 2. │ └─cassette$call_block(...) 3. └─rnpn::npn_species_types() at test-npn-get-species.R:81:5 4. └─httr2::resp_body_json(resp, simplifyVector = TRUE) 5. └─httr2::resp_check_content_type(...) 6. └─httr2:::check_content_type(...) 7. └─cli::cli_abort(...) 8. └─rlang::abort(...) ── Error ('test-npn-observations.R:18:5'): npn_download_status_data() works ──── Error in `httr2::resp_body_json(resp, simplifyVector = TRUE)`: Unexpected content type "NA". * Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-npn-observations.R:17:3 2. │ └─cassette$call_block(...) 3. ├─rnpn::npn_download_status_data(...) at test-npn-observations.R:18:5 4. │ └─rnpn:::npn_get_data_by_year(...) 5. │ └─rnpn:::npn_get_data(...) 6. │ ├─httr2::resp_body_json(resp, simplifyVector = TRUE) %>% ... 7. │ └─httr2::resp_body_json(resp, simplifyVector = TRUE) 8. │ └─httr2::resp_check_content_type(...) 9. │ └─httr2:::check_content_type(...) 10. │ └─cli::cli_abort(...) 11. │ └─rlang::abort(...) 12. ├─rnpn (local) wrangle_dl_data(.) 13. │ └─... %>% ... 14. ├─dplyr::mutate(...) 15. ├─dplyr::mutate(...) 16. └─dplyr::mutate(...) ── Error ('test-npn-observations.R:52:5'): phenometrics downloads work ───────── Error in `httr2::resp_body_json(resp, simplifyVector = TRUE)`: Unexpected content type "NA". * Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-npn-observations.R:51:3 2. │ └─cassette$call_block(...) 3. ├─rnpn::npn_download_individual_phenometrics(...) at test-npn-observations.R:52:5 4. │ └─rnpn:::npn_get_data_by_year(...) 5. │ └─rnpn:::npn_get_data(...) 6. │ ├─httr2::resp_body_json(resp, simplifyVector = TRUE) %>% ... 7. │ └─httr2::resp_body_json(resp, simplifyVector = TRUE) 8. │ └─httr2::resp_check_content_type(...) 9. │ └─httr2:::check_content_type(...) 10. │ └─cli::cli_abort(...) 11. │ └─rlang::abort(...) 12. ├─rnpn (local) wrangle_dl_data(.) 13. │ └─... %>% ... 14. ├─dplyr::mutate(...) 15. ├─dplyr::mutate(...) 16. └─dplyr::mutate(...) ── Error ('test-npn-observations.R:139:5'): custom period works ──────────────── Error in `httr2::resp_body_json(resp, simplifyVector = TRUE)`: Unexpected content type "NA". * Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-npn-observations.R:138:3 2. │ └─cassette$call_block(...) 3. ├─rnpn::npn_download_individual_phenometrics(...) at test-npn-observations.R:139:5 4. │ └─rnpn:::npn_get_data_by_year(...) 5. │ └─rnpn:::npn_get_data(...) 6. │ ├─httr2::resp_body_json(resp, simplifyVector = TRUE) %>% ... 7. │ └─httr2::resp_body_json(resp, simplifyVector = TRUE) 8. │ └─httr2::resp_check_content_type(...) 9. │ └─httr2:::check_content_type(...) 10. │ └─cli::cli_abort(...) 11. │ └─rlang::abort(...) 12. ├─rnpn (local) wrangle_dl_data(.) 13. │ └─... %>% ... 14. ├─dplyr::mutate(...) 15. ├─dplyr::mutate(...) 16. └─dplyr::mutate(...) ── Error ('test-npn-partners.R:5:5'): npn_groups works ───────────────────────── Error in `httr2::resp_body_json(resp, simplifyVector = !use_hierarchy)`: Unexpected content type "NA". * Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-npn-partners.R:4:3 2. │ └─cassette$call_block(...) 3. └─rnpn::npn_groups() at test-npn-partners.R:5:5 4. └─httr2::resp_body_json(resp, simplifyVector = !use_hierarchy) 5. └─httr2::resp_check_content_type(...) 6. └─httr2:::check_content_type(...) 7. └─cli::cli_abort(...) 8. └─rlang::abort(...) ── Error ('test-npn-phenophases.R:5:5'): npn_phenophases works ───────────────── Error in `httr2::resp_body_json(resp, simplifyVector = TRUE)`: Unexpected content type "NA". * Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-npn-phenophases.R:4:3 2. │ └─cassette$call_block(...) 3. └─rnpn::npn_phenophases() at test-npn-phenophases.R:5:5 4. └─httr2::resp_body_json(resp, simplifyVector = TRUE) 5. └─httr2::resp_check_content_type(...) 6. └─httr2:::check_content_type(...) 7. └─cli::cli_abort(...) 8. └─rlang::abort(...) ── Error ('test-npn-phenophases.R:19:5'): npn_phenophase_definitions works ───── Error in `httr2::resp_body_json(resp, simplifyVector = TRUE)`: Unexpected content type "NA". * Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-npn-phenophases.R:18:3 2. │ └─cassette$call_block(...) 3. └─rnpn::npn_phenophase_definitions() at test-npn-phenophases.R:19:5 4. └─httr2::resp_body_json(resp, simplifyVector = TRUE) 5. └─httr2::resp_check_content_type(...) 6. └─httr2:::check_content_type(...) 7. └─cli::cli_abort(...) 8. └─rlang::abort(...) ── Error ('test-npn-phenophases.R:32:5'): npn_phenophase_details works ───────── Error in `httr2::resp_body_json(resp, simplifyVector = TRUE)`: Unexpected content type "NA". * Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-npn-phenophases.R:31:3 2. │ └─cassette$call_block(...) 3. └─rnpn::npn_phenophase_details(56) at test-npn-phenophases.R:32:5 4. └─httr2::resp_body_json(resp, simplifyVector = TRUE) 5. └─httr2::resp_check_content_type(...) 6. └─httr2:::check_content_type(...) 7. └─cli::cli_abort(...) 8. └─rlang::abort(...) ── Error ('test-npn-phenophases.R:53:5'): npn_phenophases_by_species works ───── Error in `httr2::resp_body_json(resp, simplifyVector = TRUE)`: Unexpected content type "NA". * Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-npn-phenophases.R:52:3 2. │ └─cassette$call_block(...) 3. └─rnpn::npn_phenophases_by_species(species_ids = 3, date = "2018-05-05") at test-npn-phenophases.R:53:5 4. └─httr2::resp_body_json(resp, simplifyVector = TRUE) 5. └─httr2::resp_check_content_type(...) 6. └─httr2:::check_content_type(...) 7. └─cli::cli_abort(...) 8. └─rlang::abort(...) ── Error ('test-npn-phenophases.R:64:5'): npn_pheno_classes works ────────────── Error in `httr2::resp_body_json(resp, simplifyVector = TRUE)`: Unexpected content type "NA". * Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-npn-phenophases.R:63:3 2. │ └─cassette$call_block(...) 3. └─rnpn::npn_pheno_classes() at test-npn-phenophases.R:64:5 4. └─httr2::resp_body_json(resp, simplifyVector = TRUE) 5. └─httr2::resp_check_content_type(...) 6. └─httr2:::check_content_type(...) 7. └─cli::cli_abort(...) 8. └─rlang::abort(...) ── Error ('test-npn-phenophases.R:76:5'): npn_abundance_categories works ─────── Error in `httr2::resp_body_json(resp, simplifyVector = TRUE)`: Unexpected content type "NA". * Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-npn-phenophases.R:75:3 2. │ └─cassette$call_block(...) 3. └─rnpn::npn_abundance_categories() at test-npn-phenophases.R:76:5 4. └─httr2::resp_body_json(resp, simplifyVector = TRUE) 5. └─httr2::resp_check_content_type(...) 6. └─httr2:::check_content_type(...) 7. └─cli::cli_abort(...) 8. └─rlang::abort(...) ── Error ('test-npn-phenophases.R:88:5'): npn_get_phenophases_for_taxon works ── Error in `httr2::resp_body_json(resp, simplifyVector = TRUE)`: Unexpected content type "NA". * Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-npn-phenophases.R:87:3 2. │ └─cassette$call_block(...) 3. └─rnpn::npn_get_phenophases_for_taxon(class_ids = 5, date = "2018-05-05") at test-npn-phenophases.R:88:5 4. └─httr2::resp_body_json(resp, simplifyVector = TRUE) 5. └─httr2::resp_check_content_type(...) 6. └─httr2:::check_content_type(...) 7. └─cli::cli_abort(...) 8. └─rlang::abort(...) ── Error ('test-npn-stations.R:5:5'): npn_stations functions ─────────────────── Error in `httr2::resp_body_json(resp, simplifyVector = TRUE)`: Unexpected content type "NA". * Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-npn-stations.R:4:3 2. │ └─cassette$call_block(...) 3. └─rnpn::npn_stations() at test-npn-stations.R:5:5 4. └─httr2::resp_body_json(resp, simplifyVector = TRUE) 5. └─httr2::resp_check_content_type(...) 6. └─httr2:::check_content_type(...) 7. └─cli::cli_abort(...) 8. └─rlang::abort(...) ── Error ('test-npn-stations.R:28:4'): npn_stations_by_state functions ───────── Error in `httr2::resp_body_json(resp, simplifyVector = TRUE)`: Unexpected content type "NA". * Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-npn-stations.R:27:3 2. │ └─cassette$call_block(...) 3. └─rnpn::npn_stations_by_state() at test-npn-stations.R:28:4 4. └─httr2::resp_body_json(resp, simplifyVector = TRUE) 5. └─httr2::resp_check_content_type(...) 6. └─httr2:::check_content_type(...) 7. └─cli::cli_abort(...) 8. └─rlang::abort(...) ── Error ('test-npn-stations.R:41:5'): npn_stations_by_location functions ────── Error in `httr2::resp_body_json(., simplifyVector = TRUE)`: Unexpected content type "NA". * Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-npn-stations.R:40:3 2. │ └─cassette$call_block(...) 3. ├─rnpn::npn_stations_by_location(wkt = "POLYGON((-110.94484396954107 32.23623109416672,-110.96166678448247 32.23594069208043,-110.95960684795904 32.21328646993733,-110.94244071026372 32.21343170728929,-110.93935080547857 32.23216538049456,-110.94484396954107 32.23623109416672))") at test-npn-stations.R:41:5 4. │ └─... %>% tibble::as_tibble() 5. ├─tibble::as_tibble(.) 6. └─httr2::resp_body_json(., simplifyVector = TRUE) 7. └─httr2::resp_check_content_type(...) 8. └─httr2:::check_content_type(...) 9. └─cli::cli_abort(...) 10. └─rlang::abort(...) ── Error ('test-npn-stations.R:55:5'): npn_stations_with_spp functions ───────── Error in `httr2::resp_body_json(resp, simplifyVector = TRUE)`: Unexpected content type "NA". * Expecting type "application/json" or suffix "json". Backtrace: ▆ 1. ├─vcr::use_cassette(...) at test-npn-stations.R:54:3 2. │ └─cassette$call_block(...) 3. └─rnpn::npn_stations_with_spp(100) at test-npn-stations.R:55:5 4. └─httr2::resp_body_json(resp, simplifyVector = TRUE) 5. └─httr2::resp_check_content_type(...) 6. └─httr2:::check_content_type(...) 7. └─cli::cli_abort(...) 8. └─rlang::abort(...) [ FAIL 21 | WARN 0 | SKIP 19 | PASS 11 ] Error: Test failures Execution halted Package: vcr Check: tests New result: ERROR Running ‘test-all.R’ [7s/13s] Running the tests in ‘tests/test-all.R’ failed. Complete output: > library("testthat") > library('vcr') > test_check("vcr") using base url for tests: https://hb.cran.dev [ FAIL 1 | WARN 10 | SKIP 50 | PASS 501 ] ══ Skipped tests (50) ══════════════════════════════════════════════════════════ • Did not find: '../../man/vcr_configure.Rd' (1): 'test-configuration.R:53:3' • On CRAN (49): 'test-RequestHandler.R:1:1', 'test-RequestIgnorer.R:41:3', 'test-RequestIgnorer.R:83:3', 'test-ause_cassette.R:6:3', 'test-ause_cassette_match_body_empty_body.R:2:3', 'test-ause_cassette_match_query.R:11:3', 'test-ause_cassette_match_requests_on.R:2:3', 'test-ause_cassette_match_requests_on.R:129:3', 'test-ause_cassette_match_requests_on_json.R:6:3', 'test-ause_cassette_match_requests_on_json.R:63:3', 'test-ause_cassette_re_record.R:15:3', 'test-ause_cassette_record_modes.R:13:3', 'test-ause_cassette_record_modes.R:54:3', 'test-ause_cassette_record_modes.R:80:3', 'test-ause_cassette_record_modes.R:126:3', 'test-ause_cassette_write_to_disk.R:8:3', 'test-ause_cassette_write_to_disk.R:39:3', 'test-ause_cassette_write_to_disk.R:67:3', 'test-ause_cassette_write_to_disk_binary_files.R:7:3', 'test-ause_cassette_write_to_disk_binary_files.R:42:3', 'test-ause_cassette_write_to_disk_binary_files.R:104:3', 'test-binary_images.R:7:3', 'test-binary_images.R:57:3', 'test-check_cassette_names.R:2:3', 'test-crul.R:1:1', 'test-filter-sensitive-strings.R:1:1', 'test-filter_headers.R:4:3', 'test-filter_headers.R:61:3', 'test-filter_headers.R:106:3', 'test-filter_headers.R:138:3', 'test-filter_headers.R:185:3', 'test-filter_headers.R:233:3', 'test-filter_query_parameters.R:10:3', 'test-filter_query_parameters.R:57:3', 'test-filter_query_parameters.R:104:3', 'test-filter_query_parameters.R:154:3', 'test-filter_query_parameters.R:199:3', 'test-httr.R:1:1', 'test-httr2.R:1:1', 'test-request_summary.R:10:3', 'test-response_summary.R:13:3', 'test-response_summary.R:29:3', 'test-response_summary.R:47:3', 'test-serializers_json.R:22:3', 'test-use_vcr.R:4:3', 'test-vcr_test_path.R:2:3', 'test-vcr_test_path.R:24:3', 'test-vcr_test_path.R:46:3', 'test-write_disk_path_package_context.R:4:3' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-localhost_port.R:25:3'): testing against localhost port works ── Error in `readLines(con, warn = readLines.warn)`: cannot open the connection Backtrace: ▆ 1. └─yaml::yaml.load_file(path) at test-localhost_port.R:25:3 2. ├─yaml::yaml.load(...) 3. │ └─base::paste(string, collapse = "\n") 4. └─base::readLines(con, warn = readLines.warn) [ FAIL 1 | WARN 10 | SKIP 50 | PASS 501 ] Error: Test failures Execution halted