Running ‘testthat.R’ [5s/20s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(FedData)
  Loading required package: sp
  > 
  > test_check("FedData")
  ── 1. Error: The SoilDB data queries work (@test.SSURGO.R#16)  ─────────────────
  Improperly formatted SDA SQL request
  1: expect_is(SDA_query(q), "data.frame") at testthat/test.SSURGO.R:16
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: SDA_query(q)
  5: tryCatch(httr::POST(url = "https://sdmdataaccess.sc.egov.usda.gov/tabular/post.rest", 
         body = list(query = q), encode = "form") %>% httr::content(as = "parse", encoding = "UTF-8") %>% 
         xml2::as_list() %$% NewDataSet %$% Table %>% unlist(recursive = FALSE) %>% tibble::as_tibble(), 
         error = function(e) {
             stop("Improperly formatted SDA SQL request")
         })
  6: tryCatchList(expr, classes, parentenv, handlers)
  7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  8: value[[3L]](cond)
  9: stop("Improperly formatted SDA SQL request")
  
  ── 2. Error: The SSURGO datasets are available at the correct URL (@test.SSURGO.
  Improperly formatted SDA SQL request
  1: SDA_query(q) at testthat/test.SSURGO.R:27
  2: tryCatch(httr::POST(url = "https://sdmdataaccess.sc.egov.usda.gov/tabular/post.rest", 
         body = list(query = q), encode = "form") %>% httr::content(as = "parse", encoding = "UTF-8") %>% 
         xml2::as_list() %$% NewDataSet %$% Table %>% unlist(recursive = FALSE) %>% tibble::as_tibble(), 
         error = function(e) {
             stop("Improperly formatted SDA SQL request")
         })
  3: tryCatchList(expr, classes, parentenv, handlers)
  4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  5: value[[3L]](cond)
  6: stop("Improperly formatted SDA SQL request")
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 22 SKIPPED: 1 FAILED: 2
  1. Error: The SoilDB data queries work (@test.SSURGO.R#16) 
  2. Error: The SSURGO datasets are available at the correct URL (@test.SSURGO.R#27) 
  
  Error: testthat unit tests failed
  Execution halted