Running ‘test-all.R’ [2s/4s]
Running the tests in ‘tests/test-all.R’ failed.
Complete output:
  > library(testthat)
  > test_check("cdcfluview")
  Loading required package: cdcfluview
  ── 1. Error: New API works (@test-cdcfluview.R#5)  ─────────────────────────────
  GnuTLS recv error (-54): Error in the pull function.
  1: expect_that(age_group_distribution(years = 2017), is_a("data.frame")) at testthat/test-cdcfluview.R:5
  2: condition(object)
  3: expect_is(x, class)
  4: quasi_label(enquo(object), label)
  5: eval_bare(get_expr(quo), get_env(quo))
  6: age_group_distribution(years = 2017)
  7: httr::GET(url = "https://gis.cdc.gov/grasp/fluView6/GetFlu6AllDataP", httr::user_agent(.cdcfluview_ua), 
         httr::add_headers(Accept = "application/json, text/plain, */*", Referer = "https://gis.cdc.gov/grasp/fluview/flu_by_age_virus.html"), 
         httr::timeout(.httr_timeout))
  8: request_perform(req, hu$handle$handle)
  9: request_fetch(req$output, req$url, handle)
  10: request_fetch.write_memory(req$output, req$url, handle)
  11: curl::curl_fetch_memory(url, handle = handle)
  
  ── 2. Error: Old API works (@test-cdcfluview.R#66)  ────────────────────────────
  GnuTLS recv error (-54): Error in the pull function.
  1: expect_that(dim(get_flu_data("hhs", years = 2015)), equals(c(520L, 15L))) at testthat/test-cdcfluview.R:66
  2: condition(object)
  3: expect_equal(x, expected, ..., expected.label = label)
  4: quasi_label(enquo(object), label)
  5: eval_bare(get_expr(quo), get_env(quo))
  6: get_flu_data("hhs", years = 2015)
  7: httr::POST("https://gis.cdc.gov/grasp/flu2/PostPhase02DataDownload", body = params, 
         encode = "json", httr::write_disk(out_file))
  8: request_perform(req, hu$handle$handle)
  9: request_fetch(req$output, req$url, handle)
  10: request_fetch.write_disk(req$output, req$url, handle)
  11: curl::curl_fetch_disk(url, x$path, handle = handle)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 0 SKIPPED: 0 FAILED: 2
  1. Error: New API works (@test-cdcfluview.R#5) 
  2. Error: Old API works (@test-cdcfluview.R#66) 
  
  Error: testthat unit tests failed
  Execution halted