Running ‘testthat.R’ [7s/31s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(checkmate)
  > library(coalitions)
  > 
  > test_check("coalitions")
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-scrapers.R:16:1): State wide german scrapers work ───────────────
  Error in `open.connection(x, "rb")`: SSL certificate problem: certificate has expired
  Backtrace:
       █
    1. ├─checkmate::expect_data_frame(...) test-scrapers.R:16:0
    2. │ └─checkmate::checkDataFrame(...)
    3. │   └─`%and%`(...)
    4. │     └─base::isTRUE(lhs)
    5. ├─utils::head(scrape_wahlrecht(hp.vec[1]))
    6. ├─coalitions::scrape_wahlrecht(hp.vec[1])
    7. │ ├─`%>%`(...)
    8. │ └─coalitions:::try_readHTML(address)
    9. │   └─base::tryCatch(...)
   10. │     └─base:::tryCatchList(expr, classes, parentenv, handlers)
   11. │       └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   12. │         └─value[[3L]](cond)
   13. ├─rvest::html_table(., fill = TRUE)
   14. └─rvest::html_nodes(., "table")
   15.   └─rvest::html_elements(...)
  ── Error (test-scrapers.R:46:3): Federal german scrapers work ──────────────────
  Error in `open.connection(x, "rb")`: SSL certificate problem: certificate has expired
  Backtrace:
       █
    1. ├─scrape_by() %>% filter(date == as.Date("2018-02-12")) test-scrapers.R:46:2
    2. ├─dplyr::filter(., date == as.Date("2018-02-12"))
    3. ├─coalitions::scrape_by()
    4. │ ├─`%>%`(...)
    5. │ └─coalitions:::try_readHTML(address)
    6. │   └─base::tryCatch(...)
    7. │     └─base:::tryCatchList(expr, classes, parentenv, handlers)
    8. │       └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
    9. │         └─value[[3L]](cond)
   10. ├─rvest::html_table(., fill = TRUE)
   11. └─rvest::html_nodes(., "table")
   12.   └─rvest::html_elements(...)
  ── Error (test-scrapers.R:89:3): Collapse parties works correctly ──────────────
  Error in `open.connection(x, "rb")`: SSL certificate problem: certificate has expired
  Backtrace:
       █
    1. ├─coalitions::scrape_wahlrecht("https://www.wahlrecht.de/umfragen/gms.htm") test-scrapers.R:89:2
    2. │ ├─`%>%`(...)
    3. │ └─coalitions:::try_readHTML(address)
    4. │   └─base::tryCatch(...)
    5. │     └─base:::tryCatchList(expr, classes, parentenv, handlers)
    6. │       └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
    7. │         └─value[[3L]](cond)
    8. ├─rvest::html_table(., fill = TRUE)
    9. └─rvest::html_nodes(., "table")
   10.   └─rvest::html_elements(...)
  ── Error (test-scrapers.R:116:3): Austria scrapper works ───────────────────────
  <SSL_CACERT/GenericCurlError/error/condition>
  Error in `function (type, msg, asError = TRUE) 
  {
      if (!is.character(type)) {
          i = match(type, CURLcodeValues)
          typeName = if (is.na(i)) 
              character()
          else names(CURLcodeValues)[i]
      }
      typeName = gsub("^CURLE_", "", typeName)
      fun = (if (asError) 
          stop
      else warning)
      fun(structure(list(message = msg, call = sys.call()), class = c(typeName, 
          "GenericCurlError", "error", "condition")))
  }(60L, "SSL certificate problem: certificate has expired", TRUE)`: SSL certificate problem: certificate has expired
  Backtrace:
      █
   1. ├─scrape_austria() %>% unnest("surveys") %>% filter(date == as.Date("2019-07-06")) test-scrapers.R:116:2
   2. ├─dplyr::filter(., date == as.Date("2019-07-06"))
   3. ├─tidyr::unnest(., "surveys")
   4. ├─coalitions::scrape_austria()
   5. │ └─RCurl::getURL(address)
   6. │   └─RCurl::curlPerform(curl = curl, .opts = opts, .encoding = .encoding)
   7. └─(function (type, msg, asError = TRUE) ...
  ── Error (test-workflow.R:80:2): workflow stable ───────────────────────────────
  Error in `open.connection(x, "rb")`: SSL certificate problem: certificate has expired
  Backtrace:
       █
    1. ├─scrape_wahlrecht() %>% slice(1) %>% collapse_parties test-workflow.R:80:8
    2. ├─coalitions::collapse_parties(.)
    3. │ └─checkmate::assert_data_frame(surveys, min.rows = 1, min.cols = 3)
    4. │   └─checkmate::checkDataFrame(...)
    5. │     └─`%and%`(...)
    6. │       └─base::isTRUE(lhs)
    7. ├─dplyr::slice(., 1)
    8. ├─coalitions::scrape_wahlrecht()
    9. │ ├─`%>%`(...)
   10. │ └─coalitions:::try_readHTML(address)
   11. │   └─base::tryCatch(...)
   12. │     └─base:::tryCatchList(expr, classes, parentenv, handlers)
   13. │       └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   14. │         └─value[[3L]](cond)
   15. ├─rvest::html_table(., fill = TRUE)
   16. └─rvest::html_nodes(., "table")
   17.   └─rvest::html_elements(...)
  
  [ FAIL 5 | WARN 0 | SKIP 0 | PASS 48 ]
  Error: Test failures
  In addition: Warning messages:
  1: In for (name in names(public_methods)) lockBinding(name, public_bind_env) :
    closing unused connection 6 (https://www.wahlrecht.de/umfragen/gms.htm)
  2: In for (name in names(public_methods)) lockBinding(name, public_bind_env) :
    closing unused connection 5 (https://www.wahlrecht.de/umfragen/landtage/bayern.htm)
  3: In for (name in names(public_methods)) lockBinding(name, public_bind_env) :
    closing unused connection 4 (https://www.wahlrecht.de/umfragen/allensbach.htm)
  4: In for (d in seq_along(children)) { :
    closing unused connection 4 (https://www.wahlrecht.de/umfragen/emnid.htm)
  Execution halted