Running ‘testthat.R’ [8s/336s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(nasapower)
  > 
  > test_check("nasapower")
  Loading required namespace: jsonlite
  [1] "Required column name check:"
  [1] "maxt" "mint" "radn" "rain" "year" "day" 
  [1] TRUE TRUE TRUE TRUE TRUE TRUE
  ── 1. Error: get_power returns daily point AG data (@test-get_power.R#6)  ──────
  The Daily POWER Data Access Service is currently unavailable. Please check back at a later time. If you have any questions please contact us at power-project@lists.nasa.gov Please reference our API Documentation at https://power.larc.nasa.gov for more information.
  1: vcr::use_cassette("SinglePoint_AG", {
         power_query <- get_power(community = "AG", lonlat = c(-179.5, -89.5), pars = c("T2M", 
             "T2M_MIN", "T2M_MAX", "RH2M", "WS10M"), dates = c("1983-01-01"), temporal_average = "Daily")
         expect_is(power_query, "data.frame")
         expect_equal(power_query$LAT, -89.5, tolerance = 0.001)
         expect_equal(power_query$LON, -179.5, tolerance = 0.001)
         expect_equal(power_query$YEAR, 1983)
         expect_equal(power_query$MM, 1)
         expect_equal(power_query$DD, 1)
         expect_equal(power_query$DOY, 1)
         expect_equal(power_query$YYYYMMDD, as.Date("1983-01-01"))
         expect_equal(power_query$T2M, -25.24)
         expect_equal(power_query$T2M_MIN, -25.55)
         expect_equal(power_query$T2M_MAX, -24.9)
         expect_equal(power_query$RH2M, 73.92)
         expect_equal(power_query$WS10M, 2.14)
         rm(power_query)
     }) at testthat/test-get_power.R:6
  2: cassette$call_block(...)
  3: lazyeval::lazy_eval(tmp)
  4: lapply(x, lazy_eval, data = data)
  5: FUN(X[[i]], ...)
  6: eval(x$expr, x$env, emptyenv())
  7: eval(x$expr, x$env, emptyenv())
  8: get_power(community = "AG", lonlat = c(-179.5, -89.5), pars = c("T2M", "T2M_MIN", 
         "T2M_MAX", "RH2M", "WS10M"), dates = c("1983-01-01"), temporal_average = "Daily") at testthat/test-get_power.R:7
  9: .power_query(community, lonlat_identifier, pars, dates, outputList = "CSV")
  10: stop(call. = FALSE, unlist(txt$messages))
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 85 SKIPPED: 0 FAILED: 1
  1. Error: get_power returns daily point AG data (@test-get_power.R#6) 
  
  Error: testthat unit tests failed
  Execution halted