Running ‘testthat.R’ [9s/48s]
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
  
  Request failed [502]. Retrying in 1.3 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
  vcr is currently using the following cassette:
    - /home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/norgeo.Rcheck/tests/fixtures/change-error.yml
      - record_mode: once
      - match_requests_on: method, uri
  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.7 seconds...
  No encoding supplied: defaulting to UTF-8.
  *** Change table for fylke doesn't exist. From 2018-01-01 to 2019-01-02 *** 
  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=2019-01-01&to=2020-01-02
  vcr is currently using the following cassette:
    - /home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/norgeo.Rcheck/tests/fixtures/change-error.yml
      - record_mode: once
      - match_requests_on: method, uri
  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=2019-01-01&to=2020-01-02
  vcr is currently using the following cassette:
    - /home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/norgeo.Rcheck/tests/fixtures/change-error.yml
      - record_mode: once
      - match_requests_on: method, uri
  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 4 seconds...
  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/1/codes?from=2018-01-01&to=2021-01-02
  vcr is currently using the following cassette:
    - /home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/norgeo.Rcheck/tests/fixtures/codes-fromto-error.yml
      - record_mode: once
      - match_requests_on: method, uri
  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.3 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/1/codes?from=2018-01-01&to=2021-01-02
  vcr is currently using the following cassette:
    - /home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/norgeo.Rcheck/tests/fixtures/codes-fromto-error.yml
      - record_mode: once
      - match_requests_on: method, uri
  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...
  Request failed [502]. Retrying in 1.3 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/corresponds?targetClassificationId=131&from=2018-01-01&to=2020-01-02
  vcr is currently using the following cassette:
    - /home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/norgeo.Rcheck/tests/fixtures/correspond-error.yml
      - record_mode: once
      - match_requests_on: method, uri
  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.6 seconds...
  No encoding supplied: defaulting to UTF-8.
  Request failed [502]. Retrying in 1.5 seconds...
  
  
  
  
  [ FAIL 2 | WARN 2 | SKIP 0 | PASS 20 ]
  
  ══ 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]
  ── Failure ('test-track-change.R:6'): Track change ─────────────────────────────
  track_change("kommune", 2017, 2020) (`actual`) not equal to `dtKomm` (`expected`).
  
  actual vs expected
                                               newName
    actual[89, ]    Sørfold                           
    actual[90, ]    Steigen                           
    actual[91, ]    Lødingen                          
  - actual[92, ]    Evenes                            
  + expected[92, ]  Evenes - Evenášši                 
    actual[93, ]    Røst                              
    actual[94, ]    Værøy                             
    actual[95, ]    Flakstad                          
  
       actual$newName | expected$newName        
  [89] "Sørfold"      | "Sørfold"           [89]
  [90] "Steigen"      | "Steigen"           [90]
  [91] "Lødingen"     | "Lødingen"          [91]
  [92] "Evenes"       - "Evenes - Evenášši" [92]
  [93] "Røst"         | "Røst"              [93]
  [94] "Værøy"        | "Værøy"             [94]
  [95] "Flakstad"     | "Flakstad"          [95]
  
  [ FAIL 2 | WARN 2 | SKIP 0 | PASS 20 ]
  Error: Test failures
  Execution halted