Running ‘testthat.R’ [10s/33s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(norgeo)
  norgeo version 2.1.1
  > 
  > test_check("norgeo")
  Start casting geo codes from API ............
  Data for grunnkrets to bydel in 2020 have 1644 rows
  Data for grunnkrets to kommune in 2020 have 14453 rows
  Data for kommune to fylke in 2020 have 356 rows
  No code changes from 1999-01-01 to 2000-01-02 or not available via API
  No code changes from 2000-01-01 to 2001-01-02 or not available via API
  No code changes from 2001-01-01 to 2002-01-02 or not available via API
  
  Grunnkrets codes change before 2002 are from the dataset `GrunnkretsBefore2002`
  No code changes from 2018-01-01 to 2019-01-02 or not available via API
  
  Error: 
  
  ================================================================================
  An HTTP request has been made that vcr does not know how to handle:
  GET http://data.ssb.no/api/klass/v1/classifications/104/codesAt?date=2018-01-01
  There is currently no cassette in use. There are a few ways
  you can configure vcr to handle this request:
  
  Set `VCR_VERBOSE_ERRORS=TRUE` for more verbose errors
  If you're not sure what to do, open an issue https://github.com/ropensci/vcr/issues
  & see https://books.ropensci.org/http-testing
  ================================================================================
  Request failed [ERROR]. Retrying in 1.8 seconds...
  Error: 
  
  ================================================================================
  An HTTP request has been made that vcr does not know how to handle:
  GET http://data.ssb.no/api/klass/v1/classifications/104/codesAt?date=2018-01-01
  There is currently no cassette in use. There are a few ways
  you can configure vcr to handle this request:
  
  Set `VCR_VERBOSE_ERRORS=TRUE` for more verbose errors
  If you're not sure what to do, open an issue https://github.com/ropensci/vcr/issues
  & see https://books.ropensci.org/http-testing
  ================================================================================
  Request failed [ERROR]. Retrying in 1.9 seconds...
  Error: 
  
  ================================================================================
  An HTTP request has been made that vcr does not know how to handle:
  GET http://data.ssb.no/api/klass/v1/classifications/104/changes?from=2018-01-01&to=2019-01-02
  There is currently no cassette in use. There are a few ways
  you can configure vcr to handle this request:
  
  Set `VCR_VERBOSE_ERRORS=TRUE` for more verbose errors
  If you're not sure what to do, open an issue https://github.com/ropensci/vcr/issues
  & see https://books.ropensci.org/http-testing
  ================================================================================
  Request failed [ERROR]. Retrying in 1.7 seconds...
  Error: 
  
  ================================================================================
  An HTTP request has been made that vcr does not know how to handle:
  GET http://data.ssb.no/api/klass/v1/classifications/104/changes?from=2018-01-01&to=2019-01-02
  There is currently no cassette in use. There are a few ways
  you can configure vcr to handle this request:
  
  Set `VCR_VERBOSE_ERRORS=TRUE` for more verbose errors
  If you're not sure what to do, open an issue https://github.com/ropensci/vcr/issues
  & see https://books.ropensci.org/http-testing
  ================================================================================
  Request failed [ERROR]. Retrying in 2.7 seconds...
  Error: 
  
  ================================================================================
  An HTTP request has been made that vcr does not know how to handle:
  GET http://data.ssb.no/api/klass/v1/classifications/131/changes?from=2018-01-01&to=2019-01-02
  There is currently no cassette in use. There are a few ways
  you can configure vcr to handle this request:
  
  Set `VCR_VERBOSE_ERRORS=TRUE` for more verbose errors
  If you're not sure what to do, open an issue https://github.com/ropensci/vcr/issues
  & see https://books.ropensci.org/http-testing
  ================================================================================
  Request failed [ERROR]. Retrying in 1 seconds...
  Error: 
  
  ================================================================================
  An HTTP request has been made that vcr does not know how to handle:
  GET http://data.ssb.no/api/klass/v1/classifications/131/changes?from=2018-01-01&to=2019-01-02
  There is currently no cassette in use. There are a few ways
  you can configure vcr to handle this request:
  
  Set `VCR_VERBOSE_ERRORS=TRUE` for more verbose errors
  If you're not sure what to do, open an issue https://github.com/ropensci/vcr/issues
  & see https://books.ropensci.org/http-testing
  ================================================================================
  Request failed [ERROR]. Retrying in 3.5 seconds...
  Error: 
  
  ================================================================================
  An HTTP request has been made that vcr does not know how to handle:
  GET http://data.ssb.no/api/klass/v1/classifications/131/changes?from=2018-01-01&to=2019-01-02
  There is currently no cassette in use. There are a few ways
  you can configure vcr to handle this request:
  
  Set `VCR_VERBOSE_ERRORS=TRUE` for more verbose errors
  If you're not sure what to do, open an issue https://github.com/ropensci/vcr/issues
  & see https://books.ropensci.org/http-testing
  ================================================================================
  Request failed [ERROR]. Retrying in 1 seconds...
  Error: 
  
  ================================================================================
  An HTTP request has been made that vcr does not know how to handle:
  GET http://data.ssb.no/api/klass/v1/classifications/131/changes?from=2018-01-01&to=2019-01-02
  There is currently no cassette in use. There are a few ways
  you can configure vcr to handle this request:
  
  Set `VCR_VERBOSE_ERRORS=TRUE` for more verbose errors
  If you're not sure what to do, open an issue https://github.com/ropensci/vcr/issues
  & see https://books.ropensci.org/http-testing
  ================================================================================
  Request failed [ERROR]. Retrying in 1.5 seconds...
  [ FAIL 11 | WARN 0 | SKIP 0 | PASS 8 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-cast-geo.R:4'): Cast geo ─────────────────────────────────────
  cast_geo(2020) (`actual`) not equal to `dt` (`expected`).
  
  actual vs expected
                                                                               name
    actual[556, ]     Lødingen                                                     
    actual[557, ]     Lødingen                                                     
    actual[558, ]     Uoppgitt delområde                                           
  - actual[559, ]     Evenes                                                       
  + expected[559, ]   Evenes - Evenášši                                            
    actual[560, ]     Evenes                                                       
    actual[561, ]     Uoppgitt delområde                                           
    actual[562, ]     Røst                                                         
  
        actual$name          | expected$name             
  [556] "Lødingen"           | "Lødingen"           [556]
  [557] "Lødingen"           | "Lødingen"           [557]
  [558] "Uoppgitt delområde" | "Uoppgitt delområde" [558]
  [559] "Evenes"             - "Evenes - Evenášši"  [559]
  [560] "Evenes"             | "Evenes"             [560]
  [561] "Uoppgitt delområde" | "Uoppgitt delområde" [561]
  [562] "Røst"               | "Røst"               [562]
  ── Error ('test-get-change.R:28'): get change - error ──────────────────────────
  Error in `vapply(interactions, function(x) {
      sprintf("%s => %s", request_summary(Request$new()$from_hash(x$request)), 
          response_summary(VcrResponse$new()$from_hash(x$response)))
  }, "")`: values must be length 1,
   but FUN(X[[1]]) result is length 0
  Backtrace:
      ▆
   1. └─vcr::use_cassette(...) at test-get-change.R:28:2
   2.   └─vcr::insert_cassette(...)
   3.     └─Cassette$new(...)
   4.       └─vcr (local) initialize(...)
   5.         └─self$http_interactions()
   6.           └─HTTPInteractionList$new(...)
   7.             └─vcr (local) initialize(...)
   8.               └─base::vapply(...)
  ── Error ('test-get-change.R:36'): get change - retry ──────────────────────────
  Error in `vapply(interactions, function(x) {
      sprintf("%s => %s", request_summary(Request$new()$from_hash(x$request)), 
          response_summary(VcrResponse$new()$from_hash(x$response)))
  }, "")`: values must be length 1,
   but FUN(X[[1]]) result is length 0
  Backtrace:
      ▆
   1. └─vcr::use_cassette(...) at test-get-change.R:36:2
   2.   └─vcr::insert_cassette(...)
   3.     └─Cassette$new(...)
   4.       └─vcr (local) initialize(...)
   5.         └─self$http_interactions()
   6.           └─HTTPInteractionList$new(...)
   7.             └─vcr (local) initialize(...)
   8.               └─base::vapply(...)
  ── Error ('test-get-code.R:3'): get code at ────────────────────────────────────
  Error: 
  
  ================================================================================
  An HTTP request has been made that vcr does not know how to handle:
  GET http://data.ssb.no/api/klass/v1/classifications/104/codesAt?date=2018-01-01
  There is currently no cassette in use. There are a few ways
  you can configure vcr to handle this request:
  
  Set `VCR_VERBOSE_ERRORS=TRUE` for more verbose errors
  If you're not sure what to do, open an issue https://github.com/ropensci/vcr/issues
  & see https://books.ropensci.org/http-testing
  ================================================================================
  
  
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(get_code(type = "fylke", 2018), dtOut) at test-get-code.R:3:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─norgeo::get_code(type = "fylke", 2018)
   5.   └─norgeo:::set_url(...)
   6.     └─httr::RETRY("GET", url = endUrl, query = codeQry)
  ── Error ('test-get-code.R:17'): get codes - error ─────────────────────────────
  Error in `vapply(interactions, function(x) {
      sprintf("%s => %s", request_summary(Request$new()$from_hash(x$request)), 
          response_summary(VcrResponse$new()$from_hash(x$response)))
  }, "")`: values must be length 1,
   but FUN(X[[1]]) result is length 0
  Backtrace:
      ▆
   1. └─vcr::use_cassette(...) at test-get-code.R:17:2
   2.   └─vcr::insert_cassette(...)
   3.     └─Cassette$new(...)
   4.       └─vcr (local) initialize(...)
   5.         └─self$http_interactions()
   6.           └─HTTPInteractionList$new(...)
   7.             └─vcr (local) initialize(...)
   8.               └─base::vapply(...)
  ── Error ('test-get-code.R:24'): get codes - retry ─────────────────────────────
  Error in `vapply(interactions, function(x) {
      sprintf("%s => %s", request_summary(Request$new()$from_hash(x$request)), 
          response_summary(VcrResponse$new()$from_hash(x$response)))
  }, "")`: values must be length 1,
   but FUN(X[[1]]) result is length 0
  Backtrace:
      ▆
   1. └─vcr::use_cassette(...) at test-get-code.R:24:2
   2.   └─vcr::insert_cassette(...)
   3.     └─Cassette$new(...)
   4.       └─vcr (local) initialize(...)
   5.         └─self$http_interactions()
   6.           └─HTTPInteractionList$new(...)
   7.             └─vcr (local) initialize(...)
   8.               └─base::vapply(...)
  ── Error ('test-get-correspond.R:12'): get correspond - error ──────────────────
  Error in `vapply(interactions, function(x) {
      sprintf("%s => %s", request_summary(Request$new()$from_hash(x$request)), 
          response_summary(VcrResponse$new()$from_hash(x$response)))
  }, "")`: values must be length 1,
   but FUN(X[[1]]) result is length 0
  Backtrace:
      ▆
   1. └─vcr::use_cassette(...) at test-get-correspond.R:12:2
   2.   └─vcr::insert_cassette(...)
   3.     └─Cassette$new(...)
   4.       └─vcr (local) initialize(...)
   5.         └─self$http_interactions()
   6.           └─HTTPInteractionList$new(...)
   7.             └─vcr (local) initialize(...)
   8.               └─base::vapply(...)
  ── Error ('test-get-correspond.R:19'): get correspond - retry ──────────────────
  Error in `vapply(interactions, function(x) {
      sprintf("%s => %s", request_summary(Request$new()$from_hash(x$request)), 
          response_summary(VcrResponse$new()$from_hash(x$response)))
  }, "")`: values must be length 1,
   but FUN(X[[1]]) result is length 0
  Backtrace:
      ▆
   1. └─vcr::use_cassette(...) at test-get-correspond.R:19:2
   2.   └─vcr::insert_cassette(...)
   3.     └─Cassette$new(...)
   4.       └─vcr (local) initialize(...)
   5.         └─self$http_interactions()
   6.           └─HTTPInteractionList$new(...)
   7.             └─vcr (local) initialize(...)
   8.               └─base::vapply(...)
  ── Error ('test-track-change.R:5'): Track change ───────────────────────────────
  Error: 
  
  ================================================================================
  An HTTP request has been made that vcr does not know how to handle:
  GET http://data.ssb.no/api/klass/v1/classifications/104/changes?from=2018-01-01&to=2019-01-02
  There is currently no cassette in use. There are a few ways
  you can configure vcr to handle this request:
  
  Set `VCR_VERBOSE_ERRORS=TRUE` for more verbose errors
  If you're not sure what to do, open an issue https://github.com/ropensci/vcr/issues
  & see https://books.ropensci.org/http-testing
  ================================================================================
  
  
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(track_change("fylke", 2018, 2020), dtOut) at test-track-change.R:5:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─norgeo::track_change("fylke", 2018, 2020)
   5.   └─norgeo:::data_change(type, from, to)
   6.     └─norgeo::get_change(type = type, from = from, to = to, quiet = TRUE)
   7.       └─httr::RETRY("GET", url = chgUrl, query = chgQ)
  ── Error ('test-track-change.R:11'): Track split ───────────────────────────────
  Error: 
  
  ================================================================================
  An HTTP request has been made that vcr does not know how to handle:
  GET http://data.ssb.no/api/klass/v1/classifications/131/changes?from=2018-01-01&to=2019-01-02
  There is currently no cassette in use. There are a few ways
  you can configure vcr to handle this request:
  
  Set `VCR_VERBOSE_ERRORS=TRUE` for more verbose errors
  If you're not sure what to do, open an issue https://github.com/ropensci/vcr/issues
  & see https://books.ropensci.org/http-testing
  ================================================================================
  
  
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(track_split("k", 2018, 2020), dtOut) at test-track-change.R:11:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─norgeo::track_split("k", 2018, 2020)
   5.   └─norgeo::track_change(type, from, to)
   6.     └─norgeo:::data_change(type, from, to)
   7.       └─norgeo::get_change(type = type, from = from, to = to, quiet = TRUE)
   8.         └─httr::RETRY("GET", url = chgUrl, query = chgQ)
  ── Error ('test-track-change.R:16'): Track merge ───────────────────────────────
  Error: 
  
  ================================================================================
  An HTTP request has been made that vcr does not know how to handle:
  GET http://data.ssb.no/api/klass/v1/classifications/131/changes?from=2018-01-01&to=2019-01-02
  There is currently no cassette in use. There are a few ways
  you can configure vcr to handle this request:
  
  Set `VCR_VERBOSE_ERRORS=TRUE` for more verbose errors
  If you're not sure what to do, open an issue https://github.com/ropensci/vcr/issues
  & see https://books.ropensci.org/http-testing
  ================================================================================
  
  
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(track_merge("k", 2018, 2020), dtOut) at test-track-change.R:16:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─norgeo::track_merge("k", 2018, 2020)
   5.   └─norgeo::track_change(type, from, to)
   6.     └─norgeo:::data_change(type, from, to)
   7.       └─norgeo::get_change(type = type, from = from, to = to, quiet = TRUE)
   8.         └─httr::RETRY("GET", url = chgUrl, query = chgQ)
  
  [ FAIL 11 | WARN 0 | SKIP 0 | PASS 8 ]
  Error: Test failures
  Execution halted