Running ‘testthat.R’ [10s/122s]
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(BrazilDataAPI)
  > 
  > test_check("BrazilDataAPI")
  Error: Received status code 400
  Error: Received status code 404
  Error: status 400 - CNPJ not found or invalid.
  Error: status 404 - CNPJ not found or invalid.
  Saving _problems/test-get_country_info_br-33.R
  API request failed.
  Saving _problems/test-get_country_info_br-58.R
  Saving _problems/test-get_country_info_br-59.R
  Saving _problems/test-get_country_info_br-60.R
  Saving _problems/test-get_country_info_br-61.R
  Saving _problems/test-get_country_info_br-62.R
  Saving _problems/test-get_country_info_br-63.R
  API request failed.
  Saving _problems/test-get_country_info_br-68.R
  Saving _problems/test-get_country_info_br-69.R
  Saving _problems/test-get_country_info_br-70.R
  Saving _problems/test-get_country_info_br-71.R
  API request failed.
  Saving _problems/test-get_country_info_br-77.R
  Saving _problems/test-get_country_info_br-78.R
  API request failed.
  Saving _problems/test-get_country_info_br-84.R
  Saving _problems/test-get_country_info_br-85.R
  API request failed.
  API request failed.
  API request failed.
  API request failed.
  API request failed.
  Saving _problems/test-get_country_info_br-102.R
  Saving _problems/test-get_country_info_br-103.R
  Saving _problems/test-get_country_info_br-104.R
  Saving _problems/test-get_country_info_br-105.R
  Saving _problems/test-get_country_info_br-106.R
  Saving _problems/test-get_country_info_br-107.R
  Saving _problems/test-get_country_info_br-108.R
  Saving _problems/test-get_country_info_br-109.R
  Datasets available in the 'BrazilDataAPI' package:
  Datasets available in the 'BrazilDataAPI' package:
  [ FAIL 23 | WARN 0 | SKIP 150 | PASS 103 ]
  
  ══ Skipped tests (150) ═════════════════════════════════════════════════════════
  • On CRAN (150): 'test-get_brazil_banks.R:23:3',
    'test-get_brazil_banks.R:42:3', 'test-get_brazil_cep.R:23:3',
    'test-get_brazil_cep.R:51:3', 'test-get_brazil_child_mortality.R:23:3',
    'test-get_brazil_child_mortality.R:37:3',
    'test-get_brazil_child_mortality.R:43:3',
    'test-get_brazil_child_mortality.R:50:3',
    'test-get_brazil_child_mortality.R:56:3',
    'test-get_brazil_child_mortality.R:63:3',
    'test-get_brazil_child_mortality.R:69:3',
    'test-get_brazil_child_mortality.R:75:3',
    'test-get_brazil_child_mortality.R:81:3',
    'test-get_brazil_child_mortality.R:87:3',
    'test-get_brazil_child_mortality.R:93:3',
    'test-get_brazil_child_mortality.R:99:3',
    'test-get_brazil_child_mortality.R:110:3',
    'test-get_brazil_child_mortality.R:126:3',
    'test-get_brazil_child_mortality.R:135:3', 'test-get_brazil_cnpj.R:23:3',
    'test-get_brazil_cnpj.R:57:3', 'test-get_brazil_cpi.R:23:3',
    'test-get_brazil_cpi.R:37:3', 'test-get_brazil_cpi.R:43:3',
    'test-get_brazil_cpi.R:50:3', 'test-get_brazil_cpi.R:56:3',
    'test-get_brazil_cpi.R:63:3', 'test-get_brazil_cpi.R:69:3',
    'test-get_brazil_cpi.R:75:3', 'test-get_brazil_cpi.R:81:3',
    'test-get_brazil_cpi.R:87:3', 'test-get_brazil_cpi.R:93:3',
    'test-get_brazil_cpi.R:99:3', 'test-get_brazil_cpi.R:110:3',
    'test-get_brazil_cpi.R:119:3', 'test-get_brazil_cpi.R:134:3',
    'test-get_brazil_cpi.R:143:3', 'test-get_brazil_cpi.R:160:3',
    'test-get_brazil_energy_use.R:23:3', 'test-get_brazil_energy_use.R:37:3',
    'test-get_brazil_energy_use.R:43:3', 'test-get_brazil_energy_use.R:50:3',
    'test-get_brazil_energy_use.R:56:3', 'test-get_brazil_energy_use.R:63:3',
    'test-get_brazil_energy_use.R:69:3', 'test-get_brazil_energy_use.R:75:3',
    'test-get_brazil_energy_use.R:81:3', 'test-get_brazil_energy_use.R:87:3',
    'test-get_brazil_energy_use.R:93:3', 'test-get_brazil_energy_use.R:99:3',
    'test-get_brazil_energy_use.R:111:3', 'test-get_brazil_energy_use.R:122:3',
    'test-get_brazil_energy_use.R:131:3', 'test-get_brazil_energy_use.R:143:3',
    'test-get_brazil_energy_use.R:155:3', 'test-get_brazil_energy_use.R:164:3',
    'test-get_brazil_gdp.R:23:3', 'test-get_brazil_gdp.R:38:3',
    'test-get_brazil_gdp.R:44:3', 'test-get_brazil_gdp.R:51:3',
    'test-get_brazil_gdp.R:57:3', 'test-get_brazil_gdp.R:64:3',
    'test-get_brazil_gdp.R:70:3', 'test-get_brazil_gdp.R:76:3',
    'test-get_brazil_gdp.R:82:3', 'test-get_brazil_gdp.R:88:3',
    'test-get_brazil_gdp.R:94:3', 'test-get_brazil_gdp.R:100:3',
    'test-get_brazil_gdp.R:112:3', 'test-get_brazil_gdp.R:123:3',
    'test-get_brazil_gdp.R:132:3', 'test-get_brazil_gdp.R:144:3',
    'test-get_brazil_gdp.R:157:3', 'test-get_brazil_gdp.R:169:3',
    'test-get_brazil_gdp.R:178:3', 'test-get_brazil_gdp.R:188:3',
    'test-get_brazil_holidays.R:23:3', 'test-get_brazil_holidays.R:41:3',
    'test-get_brazil_holidays.R:54:3', 'test-get_brazil_holidays.R:62:3',
    'test-get_brazil_hospital_beds.R:23:3',
    'test-get_brazil_hospital_beds.R:37:3',
    'test-get_brazil_hospital_beds.R:43:3',
    'test-get_brazil_hospital_beds.R:50:3',
    'test-get_brazil_hospital_beds.R:56:3',
    'test-get_brazil_hospital_beds.R:63:3',
    'test-get_brazil_hospital_beds.R:69:3',
    'test-get_brazil_hospital_beds.R:75:3',
    'test-get_brazil_hospital_beds.R:81:3',
    'test-get_brazil_hospital_beds.R:87:3',
    'test-get_brazil_hospital_beds.R:93:3',
    'test-get_brazil_hospital_beds.R:99:3',
    'test-get_brazil_hospital_beds.R:111:3',
    'test-get_brazil_hospital_beds.R:122:3',
    'test-get_brazil_hospital_beds.R:131:3',
    'test-get_brazil_hospital_beds.R:143:3',
    'test-get_brazil_hospital_beds.R:152:3',
    'test-get_brazil_hospital_beds.R:169:3',
    'test-get_brazil_hospital_beds.R:185:3',
    'test-get_brazil_life_expectancy.R:24:3',
    'test-get_brazil_life_expectancy.R:40:3',
    'test-get_brazil_life_expectancy.R:46:3',
    'test-get_brazil_life_expectancy.R:53:3',
    'test-get_brazil_life_expectancy.R:60:3',
    'test-get_brazil_life_expectancy.R:66:3',
    'test-get_brazil_life_expectancy.R:72:3',
    'test-get_brazil_life_expectancy.R:78:3',
    'test-get_brazil_literacy_rate.R:24:3',
    'test-get_brazil_literacy_rate.R:40:3',
    'test-get_brazil_literacy_rate.R:46:3',
    'test-get_brazil_literacy_rate.R:53:3',
    'test-get_brazil_literacy_rate.R:60:3',
    'test-get_brazil_literacy_rate.R:66:3',
    'test-get_brazil_literacy_rate.R:73:3',
    'test-get_brazil_literacy_rate.R:79:3',
    'test-get_brazil_municipalities.R:23:3',
    'test-get_brazil_municipalities.R:44:3',
    'test-get_brazil_municipalities.R:50:3', 'test-get_brazil_population.R:23:3',
    'test-get_brazil_population.R:40:3', 'test-get_brazil_population.R:46:3',
    'test-get_brazil_population.R:52:3', 'test-get_brazil_population.R:59:3',
    'test-get_brazil_population.R:65:3', 'test-get_brazil_population.R:72:3',
    'test-get_brazil_population.R:79:3', 'test-get_brazil_rate_name.R:24:3',
    'test-get_brazil_rate_name.R:37:3', 'test-get_brazil_rate_name.R:50:3',
    'test-get_brazil_rate_name.R:63:3', 'test-get_brazil_rate_name.R:71:3',
    'test-get_brazil_rate_name.R:83:3', 'test-get_brazil_rates.R:23:3',
    'test-get_brazil_rates.R:44:3', 'test-get_brazil_rates.R:55:3',
    'test-get_brazil_rates.R:61:3', 'test-get_brazil_unemployment.R:23:3',
    'test-get_brazil_unemployment.R:39:3', 'test-get_brazil_unemployment.R:45:3',
    'test-get_brazil_unemployment.R:52:3', 'test-get_brazil_unemployment.R:59:3',
    'test-get_brazil_unemployment.R:65:3', 'test-get_brazil_unemployment.R:71:3',
    'test-get_brazil_unemployment.R:78:3', 'test-get_brazil_unemployment.R:84:3',
    'test-get_brazil_vehicle_brands.R:23:3',
    'test-get_brazil_vehicle_brands.R:31:3',
    'test-get_brazil_vehicle_brands.R:39:3',
    'test-get_brazil_vehicle_brands.R:47:3',
    'test-get_brazil_vehicle_brands.R:54:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-get_country_info_br.R:33:3'): get_country_info_br() returns data of correct types ──
  <curl_error_ssl_connect_error/curl_error/error/condition>
  Error in `curl::curl_fetch_memory(url, handle = handle)`: SSL connect error [restcountries.com]:
  GnuTLS, handshake failed: The TLS connection was non-properly terminated.
  Backtrace:
      ▆
   1. ├─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:33:3
   2. │ └─httr::GET(url)
   3. │   └─httr:::request_perform(req, hu$handle$handle)
   4. │     ├─httr:::request_fetch(req$output, req$url, handle)
   5. │     └─httr:::request_fetch.write_memory(req$output, req$url, handle)
   6. │       └─curl::curl_fetch_memory(url, handle = handle)
   7. └─curl:::raise_libcurl_error(...)
  ── Failure ('test-get_country_info_br.R:58:3'): get_country_info_br() returns non-empty character values ──
  Expected `nchar(result$name_common) > 0` to be TRUE.
  Differences:
  `actual`:       
  `expected`: TRUE
  
  ── Failure ('test-get_country_info_br.R:59:3'): get_country_info_br() returns non-empty character values ──
  Expected `nchar(result$name_official) > 0` to be TRUE.
  Differences:
  `actual`:       
  `expected`: TRUE
  
  ── Failure ('test-get_country_info_br.R:60:3'): get_country_info_br() returns non-empty character values ──
  Expected `nchar(result$region) > 0` to be TRUE.
  Differences:
  `actual`:       
  `expected`: TRUE
  
  ── Failure ('test-get_country_info_br.R:61:3'): get_country_info_br() returns non-empty character values ──
  Expected `nchar(result$subregion) > 0` to be TRUE.
  Differences:
  `actual`:       
  `expected`: TRUE
  
  ── Failure ('test-get_country_info_br.R:62:3'): get_country_info_br() returns non-empty character values ──
  Expected `nchar(result$capital) > 0` to be TRUE.
  Differences:
  `actual`:       
  `expected`: TRUE
  
  ── Failure ('test-get_country_info_br.R:63:3'): get_country_info_br() returns non-empty character values ──
  Expected `nchar(result$languages) > 0` to be TRUE.
  Differences:
  `actual`:       
  `expected`: TRUE
  
  ── Failure ('test-get_country_info_br.R:68:3'): get_country_info_br() returns positive numeric values ──
  Expected `result$area > 0` to be TRUE.
  Differences:
  `actual`:       
  `expected`: TRUE
  
  ── Failure ('test-get_country_info_br.R:69:3'): get_country_info_br() returns positive numeric values ──
  Expected `result$population > 0` to be TRUE.
  Differences:
  `actual`:       
  `expected`: TRUE
  
  ── Failure ('test-get_country_info_br.R:70:3'): get_country_info_br() returns positive numeric values ──
  Expected `is.finite(result$area)` to be TRUE.
  Differences:
  `actual`:       
  `expected`: TRUE
  
  ── Failure ('test-get_country_info_br.R:71:3'): get_country_info_br() returns positive numeric values ──
  Expected `is.finite(result$population)` to be TRUE.
  Differences:
  `actual`:       
  `expected`: TRUE
  
  ── Failure ('test-get_country_info_br.R:77:3'): get_country_info_br() area is approximately correct for Brazil ──
  Expected `result$area >= 8e+06` to be TRUE.
  Differences:
  `actual`:       
  `expected`: TRUE
  
  ── Failure ('test-get_country_info_br.R:78:3'): get_country_info_br() area is approximately correct for Brazil ──
  Expected `result$area <= 9e+06` to be TRUE.
  Differences:
  `actual`:       
  `expected`: TRUE
  
  ── Failure ('test-get_country_info_br.R:84:3'): get_country_info_br() population is within reasonable range ──
  Expected `result$population >= 2e+08` to be TRUE.
  Differences:
  `actual`:       
  `expected`: TRUE
  
  ── Failure ('test-get_country_info_br.R:85:3'): get_country_info_br() population is within reasonable range ──
  Expected `result$population <= 3e+08` to be TRUE.
  Differences:
  `actual`:       
  `expected`: TRUE
  
  ── Failure ('test-get_country_info_br.R:102:3'): get_country_info_br() has no missing values in required fields ──
  Expected `is.na(result$name_common)` to be FALSE.
  Differences:
  `actual`:        
  `expected`: FALSE
  
  ── Failure ('test-get_country_info_br.R:103:3'): get_country_info_br() has no missing values in required fields ──
  Expected `is.na(result$name_official)` to be FALSE.
  Differences:
  `actual`:        
  `expected`: FALSE
  
  ── Failure ('test-get_country_info_br.R:104:3'): get_country_info_br() has no missing values in required fields ──
  Expected `is.na(result$region)` to be FALSE.
  Differences:
  `actual`:        
  `expected`: FALSE
  
  ── Failure ('test-get_country_info_br.R:105:3'): get_country_info_br() has no missing values in required fields ──
  Expected `is.na(result$subregion)` to be FALSE.
  Differences:
  `actual`:        
  `expected`: FALSE
  
  ── Failure ('test-get_country_info_br.R:106:3'): get_country_info_br() has no missing values in required fields ──
  Expected `is.na(result$capital)` to be FALSE.
  Differences:
  `actual`:        
  `expected`: FALSE
  
  ── Failure ('test-get_country_info_br.R:107:3'): get_country_info_br() has no missing values in required fields ──
  Expected `is.na(result$area)` to be FALSE.
  Differences:
  `actual`:        
  `expected`: FALSE
  
  ── Failure ('test-get_country_info_br.R:108:3'): get_country_info_br() has no missing values in required fields ──
  Expected `is.na(result$population)` to be FALSE.
  Differences:
  `actual`:        
  `expected`: FALSE
  
  ── Failure ('test-get_country_info_br.R:109:3'): get_country_info_br() has no missing values in required fields ──
  Expected `is.na(result$languages)` to be FALSE.
  Differences:
  `actual`:        
  `expected`: FALSE
  
  
  [ FAIL 23 | WARN 0 | SKIP 150 | PASS 103 ]
  Error:
  ! Test failures.
  Execution halted