Running 'testthat.R' [20s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library("testthat")
  > library("rnrfa")
  > library("lintr")
  > 
  > if (!curl::has_internet()) {
  +   message("No internet, cannot run tests")
  + }else{
  +   test_check("rnrfa")
  + }
  == Failed tests ================================================================
  -- Error (test-catalogue.R:5:3): Output of catalogue function is expected to be at least 1539x20 --
  Error: API did not return json
  Backtrace:
      x
   1. \-rnrfa::catalogue() test-catalogue.R:5:2
   2.   \-rnrfa:::nrfa_api(webservice = "station-info", parameters)
  -- Error (test-catalogue.R:12:3): Check output of catalogue for Plynlimon area --
  Error: API did not return json
  Backtrace:
      x
   1. +-testthat::expect_that(...) test-catalogue.R:12:2
   2. | \-testthat:::condition(object)
   3. |   \-testthat::expect_equal(x, expected, ..., expected.label = label)
   4. |     \-testthat::quasi_label(enquo(object), label, arg = "object")
   5. |       \-rlang::eval_bare(expr, quo_get_env(quo))
   6. \-rnrfa::catalogue(...)
   7.   \-rnrfa:::nrfa_api(webservice = "station-info", parameters)
  -- Error (test-catalogue.R:20:3): Check output of catalogue for minimum records of 100 years --
  Error: API did not return json
  Backtrace:
      x
   1. \-rnrfa::catalogue(min_rec = 100) test-catalogue.R:20:2
   2.   \-rnrfa:::nrfa_api(webservice = "station-info", parameters)
  -- Error (test-catalogue.R:40:3): Check the catalogue function filters based on column values --
  Error: API did not return json
  Backtrace:
      x
   1. \-rnrfa::catalogue(column_name = "river", column_value = "Wye") test-catalogue.R:40:2
   2.   \-rnrfa:::nrfa_api(webservice = "station-info", parameters)
  -- Error (test-cmr.R:5:3): Output of cmr function for single station -----------
  Error: API did not return json
  Backtrace:
      x
   1. \-rnrfa::cmr(id = 18019, metadata = FALSE, cl = NULL) test-cmr.R:5:2
   2.   \-rnrfa::get_ts(id, type = "cmr", metadata, cl, verbose)
   3.     +-base::unlist(get_ts_internal(id, type, metadata, verbose, full_info))
   4.     \-rnrfa:::get_ts_internal(id, type, metadata, verbose, full_info)
   5.       \-rnrfa:::nrfa_api(webservice = "time-series", parameters)
  -- Error (test-cmr.R:18:3): Output of cmr function for multiple stations -------
  Error: API did not return json
  Backtrace:
      x
   1. \-rnrfa::cmr(id = ids, metadata = FALSE, cl = NULL) test-cmr.R:18:2
   2.   \-rnrfa::get_ts(id, type = "cmr", metadata, cl, verbose)
   3.     \-base::lapply(...)
   4.       \-rnrfa:::FUN(X[[i]], ...)
   5.         \-rnrfa:::nrfa_api(webservice = "time-series", parameters)
  -- Error (test-gdf.R:6:3): Output of gdf function for id 18019 -----------------
  Error: API did not return json
  Backtrace:
      x
   1. \-rnrfa::gdf(id = 18019, metadata = FALSE, cl = NULL, verbose = FALSE) test-gdf.R:6:2
   2.   \-rnrfa::get_ts(id, type = "gdf", metadata, cl, verbose)
   3.     +-base::unlist(get_ts_internal(id, type, metadata, verbose, full_info))
   4.     \-rnrfa:::get_ts_internal(id, type, metadata, verbose, full_info)
   5.       \-rnrfa:::nrfa_api(webservice = "time-series", parameters)
  -- Error (test-gdf.R:22:3): get_ts gdf works in parallel -----------------------
  Error: one node produced an error: API did not return json
  Backtrace:
      x
   1. \-rnrfa::gdf(id = c(54022, 54090, 54091), cl = cl) test-gdf.R:22:2
   2.   \-rnrfa::get_ts(id, type = "gdf", metadata, cl, verbose)
   3.     \-parallel::parLapply(...)
   4.       +-base::do.call(...)
   5.       \-parallel::clusterApply(...)
   6.         \-parallel:::staticClusterApply(cl, fun, length(x), argfun)
   7.           \-parallel:::checkForRemoteErrors(val)
  -- Error (test-get_ts.R:18:3): get_ts cmr single works -------------------------
  Error: API did not return json
  Backtrace:
      x
   1. \-rnrfa::get_ts(id = 18019, type = "cmr") test-get_ts.R:18:2
   2.   +-base::unlist(get_ts_internal(id, type, metadata, verbose, full_info))
   3.   \-rnrfa:::get_ts_internal(id, type, metadata, verbose, full_info)
   4.     \-rnrfa:::nrfa_api(webservice = "time-series", parameters)
  -- Error (test-get_ts.R:26:3): get_ts cmr multi works --------------------------
  Error: API did not return json
  Backtrace:
      x
   1. \-rnrfa::get_ts(id = c(54022, 54090, 54091), type = "cmr") test-get_ts.R:26:2
   2.   \-base::lapply(...)
   3.     \-rnrfa:::FUN(X[[i]], ...)
   4.       \-rnrfa:::nrfa_api(webservice = "time-series", parameters)
  -- Error (test-get_ts.R:37:3): get_ts gdf single works -------------------------
  Error: API did not return json
  Backtrace:
      x
   1. \-rnrfa::get_ts(id = 18019, type = "gdf") test-get_ts.R:37:2
   2.   +-base::unlist(get_ts_internal(id, type, metadata, verbose, full_info))
   3.   \-rnrfa:::get_ts_internal(id, type, metadata, verbose, full_info)
   4.     \-rnrfa:::nrfa_api(webservice = "time-series", parameters)
  -- Error (test-get_ts.R:46:3): get_ts gdf multi works --------------------------
  Error: API did not return json
  Backtrace:
      x
   1. \-rnrfa::get_ts(id = c(54022, 54090, 54091), type = "gdf") test-get_ts.R:46:2
   2.   \-base::lapply(...)
   3.     \-rnrfa:::FUN(X[[i]], ...)
   4.       \-rnrfa:::nrfa_api(webservice = "time-series", parameters)
  -- Error (test-get_ts.R:60:3): Check get_ts works with other types -------------
  Error: API did not return json
  Backtrace:
      x
   1. \-rnrfa::get_ts(id = 43010, type = "amax-flow") test-get_ts.R:60:2
   2.   +-base::unlist(get_ts_internal(id, type, metadata, verbose, full_info))
   3.   \-rnrfa:::get_ts_internal(id, type, metadata, verbose, full_info)
   4.     \-rnrfa:::nrfa_api(webservice = "time-series", parameters)
  -- Error (test-seasonal_averages.R:5:3): seasonal_averages works ---------------
  Error: API did not return json
  Backtrace:
      x
   1. +-rnrfa::seasonal_averages(timeseries = cmr(18019), season = "Spring") test-seasonal_averages.R:5:2
   2. | \-base::as.list(timeseries)
   3. \-rnrfa::cmr(18019)
   4.   \-rnrfa::get_ts(id, type = "cmr", metadata, cl, verbose)
   5.     +-base::unlist(get_ts_internal(id, type, metadata, verbose, full_info))
   6.     \-rnrfa:::get_ts_internal(id, type, metadata, verbose, full_info)
   7.       \-rnrfa:::nrfa_api(webservice = "time-series", parameters)
  -- Error (test-station_ids.R:4:3): station_ids works ---------------------------
  Error: API did not return json
  Backtrace:
      x
   1. \-rnrfa::station_ids() test-station_ids.R:4:2
   2.   \-rnrfa:::nrfa_api(webservice = "station-ids", parameters)
  
  [ FAIL 15 | WARN 0 | SKIP 0 | PASS 16 ]
  Error: Test failures
  Execution halted