Running ‘testthat.R’ [2s/6s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(rdhs)
  > 
  > Sys.setenv("rdhs_RENVIRON_PERMISSION" = 1)
  > test_check("rdhs")
  ── Skip (test_api_calls.R:4:3): can request api through dhs_api_request via clie
  Reason: On CRAN
  
  ── Skip (test_api_endpoints.R:8:3): format catches and all_results tests ───────
  Reason: On CRAN
  
  ── Skip (test_api_endpoints.R:79:3): geojson works ─────────────────────────────
  Reason: geojson test too heavy an API test
  
  ── Skip (test_api_endpoints.R:116:3): dhs_countries works ──────────────────────
  Reason: On CRAN
  
  ── Skip (test_api_endpoints.R:140:3): dhs_data works ───────────────────────────
  Reason: On CRAN
  
  ── Skip (test_api_endpoints.R:179:3): dhs_dataUpdates works ────────────────────
  Reason: On CRAN
  
  ── Skip (test_api_endpoints.R:193:3): dhs_datasets works ───────────────────────
  Reason: On CRAN
  
  ── Skip (test_api_endpoints.R:211:3): dhs_indicators works ─────────────────────
  Reason: On CRAN
  
  ── Skip (test_api_endpoints.R:238:3): dhs_info works ───────────────────────────
  Reason: On CRAN
  
  ── Skip (test_api_endpoints.R:252:3): dhs_publications works ───────────────────
  Reason: On CRAN
  
  ── Skip (test_api_endpoints.R:279:3): dhs_survey_characteristics works ─────────
  Reason: On CRAN
  
  ── Skip (test_api_endpoints.R:301:3): dhs_surveys works ────────────────────────
  Reason: On CRAN
  
  ── Skip (test_api_endpoints.R:322:3): dhs_tags works ───────────────────────────
  Reason: On CRAN
  
  ── Skip (test_api_endpoints.R:336:3): dhs_uiUpdates works ──────────────────────
  Reason: On CRAN
  
  ── Skip (test_api_endpoints.R:346:1): post api tidy ────────────────────────────
  Reason: empty test
  
  ── Skip (test_authentication.R:4:3): authenticate_dhs works ────────────────────
  Reason: On CRAN
  
  ── Skip (test_authentication.R:23:3): available_surveys works ──────────────────
  Reason: On CRAN
  
  ── Skip (test_client_set_up.R:4:3): save credentials ───────────────────────────
  Reason: On CRAN
  
  ── Skip (test_client_set_up.R:29:3): new updates are recognised ────────────────
  Reason: On CRAN
  
  ── Skip (test_downloads.R:4:3): available surveys and download work ────────────
  Reason: On CRAN
  
  ── Skip (test_downloads.R:130:3): ETAR71FL.ZIP test ────────────────────────────
  Reason: DHS has removed this file (possibly because of what it tested
  
  ── Skip (test_downloads.R:141:3): ugir41fl.zip test ────────────────────────────
  Reason: On CRAN
  
  ── Skip (test_downloads.R:151:3): zip file ending test ─────────────────────────
  Reason: On CRAN
  
  ── Skip (test_downloads.R:163:3): Hierarchal and sas7bdat dataset test ─────────
  Reason: On CRAN
  
  ── Skip (test_downloads.R:185:3): Geo dataset test ─────────────────────────────
  Reason: On CRAN
  
  ── Skip (test_downloads.R:205:3): Geospatial coviarates ────────────────────────
  Reason: On CRAN
  
  ── Skip (test_extraction.R:4:3): query codes having downloaded surveys ─────────
  Reason: On CRAN
  
  ── Skip (test_extraction.R:108:3): surveyId in extract ─────────────────────────
  Reason: On CRAN
  
  ── Skip (test_extraction.R:125:3): rbind_labelled ──────────────────────────────
  Reason: On CRAN
  
  ── Skip (test_extraction.R:200:3): add_geo issue for Kenya ─────────────────────
  Reason: On CRAN
  
  ── Skip (test_miscellaneous.R:37:3): slow api response ─────────────────────────
  Reason: On CRAN
  
  ── Skip (test_miscellaneous.R:63:3): different locales ─────────────────────────
  Reason: OS can't test different locale test
  
  ── Skip (test_miscellaneous.R:95:3): update_rdhs_config ────────────────────────
  Reason: On CRAN
  
  ── Skip (test_miscellaneous.R:131:3): model datasets onAttach ──────────────────
  Reason: On CRAN
  
  trying URL 'https://dhsprogram.com/customcf/legacy/data/sample_download_dataset.cfm?Filename=ZZMR61FL.ZIP&Tp=1&Ctry_Code=zz&survey_id=0&doctype=dhs'
  Content type 'text/html;charset=UTF-8' length 54769 bytes (53 KB)
  ==================================================
  downloaded 53 KB
  
  ── ERROR (test_read_dhs_flat.R:13:3): datasets parse ───────────────────────────
  Error: zip file '/home/hornik/tmp/scratch/Rtmp9NFpie/file3a04386a0bc3' cannot be opened
  Backtrace:
      █
   1. └─rdhs:::read_dhs_flat(mrfl_zip) test_read_dhs_flat.R:13:2
   2.   ├─base::grepl("\\.DCF$", unzip(zfile, list = TRUE)$Name, ignore.case = TRUE)
   3.   └─utils::unzip(zfile, list = TRUE)
  
  trying URL 'https://dhsprogram.com/customcf/legacy/data/sample_download_dataset.cfm?Filename=ZZAR61FL.ZIP&Tp=4&Ctry_Code=zz&survey_id=0&doctype=hiv'
  Content type 'text/html;charset=UTF-8' length 54769 bytes (53 KB)
  ==================================================
  downloaded 53 KB
  
  ── ERROR (test_read_dhs_flat.R:57:3): data dictionaries FWF lengths match file w
  Error: zip file '/home/hornik/tmp/scratch/Rtmp9NFpie/file3a045d4d5b06' cannot be opened
  Backtrace:
      █
   1. └─rdhs::read_zipdata(arfl_zip, "\\.DCF", readLines) test_read_dhs_flat.R:57:2
   2.   ├─base::grep(...)
   3.   └─utils::unzip(zfile, list = TRUE)
  
  ── Skip (test_read_dhs_flat.R:74:3): lower case flat file check ────────────────
  Reason: On CRAN
  
  ── Skip (test_ui.R:4:3): check_for_client ──────────────────────────────────────
  Reason: On CRAN
  
  ── Skip (test_ui.R:37:3): check on the use of the default client for API caching
  Reason: On CRAN
  
  ── Skip (test_ui.R:66:3): get_datasets with no temp first ──────────────────────
  Reason: On CRAN
  
  ── Skip (test_ui.R:96:3): get_model_datasets ───────────────────────────────────
  Reason: On CRAN
  
  ── Skip (test_ui.R:106:3): get_downloaded_datasets ─────────────────────────────
  Reason: On CRAN
  
  ── Skip (test_ui.R:117:3): get_available_datasets ──────────────────────────────
  Reason: On CRAN
  
  ── Skip (test_ui.R:127:3): search_and_extract_dhs ──────────────────────────────
  Reason: On CRAN
  
  ── Skip (test_ui.R:145:3): get_variable_labels ─────────────────────────────────
  Reason: On CRAN
  
  ── Skip (test_ui.R:167:3): get_variable_labels direct via client ───────────────
  Reason: On CRAN
  
  ── Skipped tests  ──────────────────────────────────────────────────────────────
  ● DHS has removed this file (possibly because of what it tested (1)
  ● OS can't test different locale test (1)
  ● On CRAN (40)
  ● empty test (1)
  ● geojson test too heavy an API test (1)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  ERROR (test_read_dhs_flat.R:13:3): datasets parse
  ERROR (test_read_dhs_flat.R:57:3): data dictionaries FWF lengths match file width
  
  [ FAIL 2 | WARN 0 | SKIP 44 | PASS 14 ]
  Error: Test failures
  Execution halted