Running ‘testthat.R’ [10s/380s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(StreamCatTools)
  > 
  > test_check("StreamCatTools")
  [ FAIL 25 | WARN 25 | SKIP 0 | PASS 6 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-lc_get_params.R:5:3'): lc_get_params for area of interest parameters ──
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/lakes/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::lc_get_params(param = "areaOfInterest") at test-lc_get_params.R:5:3
   2.   └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/lakes/metrics")
   3.     └─jsonlite:::parse_and_simplify(...)
   4.       └─jsonlite:::parseJSON(txt, bigint_as_char)
   5.         └─jsonlite:::parse_con(txt, bigint_as_char)
   6.           ├─base::open(con, "rb")
   7.           └─base::open.connection(con, "rb")
  ── Error ('test-lc_get_params.R:11:3'): lc_get_params for region parameters ────
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/streams/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::sc_get_params(param = "region") at test-lc_get_params.R:11:3
   2.   └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/streams/metrics")
   3.     └─jsonlite:::parse_and_simplify(...)
   4.       └─jsonlite:::parseJSON(txt, bigint_as_char)
   5.         └─jsonlite:::parse_con(txt, bigint_as_char)
   6.           ├─base::open(con, "rb")
   7.           └─base::open.connection(con, "rb")
  ── Error ('test-lc_get_params.R:20:3'): lc_get_params for name parameters ──────
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/lakes/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::lc_get_params(param = "metric_names") at test-lc_get_params.R:20:3
   2.   └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/lakes/metrics")
   3.     └─jsonlite:::parse_and_simplify(...)
   4.       └─jsonlite:::parseJSON(txt, bigint_as_char)
   5.         └─jsonlite:::parse_con(txt, bigint_as_char)
   6.           ├─base::open(con, "rb")
   7.           └─base::open.connection(con, "rb")
  ── Error ('test-lc_get_params.R:26:3'): lc_get_params for state parameters ─────
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/lakes/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::lc_get_params(param = "state") at test-lc_get_params.R:26:3
   2.   └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/lakes/metrics")
   3.     └─jsonlite:::parse_and_simplify(...)
   4.       └─jsonlite:::parseJSON(txt, bigint_as_char)
   5.         └─jsonlite:::parse_con(txt, bigint_as_char)
   6.           ├─base::open(con, "rb")
   7.           └─base::open.connection(con, "rb")
  ── Error ('test-lc_get_params.R:33:3'): lc_get_params for county parameters ────
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/lakes/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::lc_get_params(param = "county") at test-lc_get_params.R:33:3
   2.   └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/lakes/metrics")
   3.     └─jsonlite:::parse_and_simplify(...)
   4.       └─jsonlite:::parseJSON(txt, bigint_as_char)
   5.         └─jsonlite:::parse_con(txt, bigint_as_char)
   6.           ├─base::open(con, "rb")
   7.           └─base::open.connection(con, "rb")
  ── Error ('test-lc_getdata.R:5:13'): lc_get_data for a sample COMID returns a data frame ──
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/streams/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::lc_get_data(...) at test-lc_getdata.R:5:13
   2.   └─StreamCatTools::sc_get_params(param = "metric_names")
   3.     └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/streams/metrics")
   4.       └─jsonlite:::parse_and_simplify(...)
   5.         └─jsonlite:::parseJSON(txt, bigint_as_char)
   6.           └─jsonlite:::parse_con(txt, bigint_as_char)
   7.             ├─base::open(con, "rb")
   8.             └─base::open.connection(con, "rb")
  ── Error ('test-lc_getdata.R:14:13'): lc_get_data for a county and ws metrics returns a data frame ──
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/streams/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::lc_get_data(...) at test-lc_getdata.R:14:13
   2.   └─StreamCatTools::sc_get_params(param = "metric_names")
   3.     └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/streams/metrics")
   4.       └─jsonlite:::parse_and_simplify(...)
   5.         └─jsonlite:::parseJSON(txt, bigint_as_char)
   6.           └─jsonlite:::parse_con(txt, bigint_as_char)
   7.             ├─base::open(con, "rb")
   8.             └─base::open.connection(con, "rb")
  ── Error ('test-lc_getdata.R:22:3'): lc_get_data for a hydroregion and ws metrics returns a data frame ──
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/streams/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::lc_get_data(...) at test-lc_getdata.R:22:3
   2.   └─StreamCatTools::sc_get_params(param = "metric_names")
   3.     └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/streams/metrics")
   4.       └─jsonlite:::parse_and_simplify(...)
   5.         └─jsonlite:::parseJSON(txt, bigint_as_char)
   6.           └─jsonlite:::parse_con(txt, bigint_as_char)
   7.             ├─base::open(con, "rb")
   8.             └─base::open.connection(con, "rb")
  ── Error ('test-lc_getdata.R:30:3'): lc_get_data for a county and ws metrics returns a data frame ──
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/streams/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::lc_get_data(...) at test-lc_getdata.R:30:3
   2.   └─StreamCatTools::sc_get_params(param = "metric_names")
   3.     └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/streams/metrics")
   4.       └─jsonlite:::parse_and_simplify(...)
   5.         └─jsonlite:::parseJSON(txt, bigint_as_char)
   6.           └─jsonlite:::parse_con(txt, bigint_as_char)
   7.             ├─base::open(con, "rb")
   8.             └─base::open.connection(con, "rb")
  ── Error ('test-lc_nlcd.R:5:13'): lc_get_data for a sample COMID returns a data frame ──
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/streams/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::lc_nlcd(year = "2019", aoi = "catchment", comid = "23783629,23794487,23812618") at test-lc_nlcd.R:5:13
   2.   └─StreamCatTools::lc_get_data(...)
   3.     └─StreamCatTools::sc_get_params(param = "metric_names")
   4.       └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/streams/metrics")
   5.         └─jsonlite:::parse_and_simplify(...)
   6.           └─jsonlite:::parseJSON(txt, bigint_as_char)
   7.             └─jsonlite:::parse_con(txt, bigint_as_char)
   8.               ├─base::open(con, "rb")
   9.               └─base::open.connection(con, "rb")
  ── Error ('test-lc_nlcd.R:13:3'): lc_get_data for a county and ws metrics returns a data frame ──
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/streams/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::lc_nlcd(...) at test-lc_nlcd.R:13:3
   2.   └─StreamCatTools::lc_get_data(...)
   3.     └─StreamCatTools::sc_get_params(param = "metric_names")
   4.       └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/streams/metrics")
   5.         └─jsonlite:::parse_and_simplify(...)
   6.           └─jsonlite:::parseJSON(txt, bigint_as_char)
   7.             └─jsonlite:::parse_con(txt, bigint_as_char)
   8.               ├─base::open(con, "rb")
   9.               └─base::open.connection(con, "rb")
  ── Error ('test-sc_get_params.R:5:13'): sc_get_params for area of interest parameters ──
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/streams/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::sc_get_params(param = "areaOfInterest") at test-sc_get_params.R:5:13
   2.   └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/streams/metrics")
   3.     └─jsonlite:::parse_and_simplify(...)
   4.       └─jsonlite:::parseJSON(txt, bigint_as_char)
   5.         └─jsonlite:::parse_con(txt, bigint_as_char)
   6.           ├─base::open(con, "rb")
   7.           └─base::open.connection(con, "rb")
  ── Error ('test-sc_get_params.R:11:3'): sc_get_params for region parameters ────
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/streams/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::sc_get_params(param = "region") at test-sc_get_params.R:11:3
   2.   └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/streams/metrics")
   3.     └─jsonlite:::parse_and_simplify(...)
   4.       └─jsonlite:::parseJSON(txt, bigint_as_char)
   5.         └─jsonlite:::parse_con(txt, bigint_as_char)
   6.           ├─base::open(con, "rb")
   7.           └─base::open.connection(con, "rb")
  ── Error ('test-sc_get_params.R:20:3'): sc_get_params for metric_names parameters ──
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/streams/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::sc_get_params(param = "metric_names") at test-sc_get_params.R:20:3
   2.   └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/streams/metrics")
   3.     └─jsonlite:::parse_and_simplify(...)
   4.       └─jsonlite:::parseJSON(txt, bigint_as_char)
   5.         └─jsonlite:::parse_con(txt, bigint_as_char)
   6.           ├─base::open(con, "rb")
   7.           └─base::open.connection(con, "rb")
  ── Error ('test-sc_get_params.R:26:3'): sc_get_params for variable_info parameters ──
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/streams/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::sc_get_params(param = "variable_info") at test-sc_get_params.R:26:3
   2.   └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/streams/metrics")
   3.     └─jsonlite:::parse_and_simplify(...)
   4.       └─jsonlite:::parseJSON(txt, bigint_as_char)
   5.         └─jsonlite:::parse_con(txt, bigint_as_char)
   6.           ├─base::open(con, "rb")
   7.           └─base::open.connection(con, "rb")
  ── Error ('test-sc_get_params.R:32:3'): sc_get_params for state parameters ─────
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/streams/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::sc_get_params(param = "state") at test-sc_get_params.R:32:3
   2.   └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/streams/metrics")
   3.     └─jsonlite:::parse_and_simplify(...)
   4.       └─jsonlite:::parseJSON(txt, bigint_as_char)
   5.         └─jsonlite:::parse_con(txt, bigint_as_char)
   6.           ├─base::open(con, "rb")
   7.           └─base::open.connection(con, "rb")
  ── Error ('test-sc_get_params.R:39:3'): sc_get_params for county parameters ────
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/streams/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::sc_get_params(param = "county") at test-sc_get_params.R:39:3
   2.   └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/streams/metrics")
   3.     └─jsonlite:::parse_and_simplify(...)
   4.       └─jsonlite:::parseJSON(txt, bigint_as_char)
   5.         └─jsonlite:::parse_con(txt, bigint_as_char)
   6.           ├─base::open(con, "rb")
   7.           └─base::open.connection(con, "rb")
  ── Error ('test-sc_getdata.R:4:3'): sc_get_data for a sample COMID returns a data frame ──
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/streams/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::sc_get_data(comid = "179", aoi = "cat", metric = "fert") at test-sc_getdata.R:4:3
   2.   └─StreamCatTools::sc_get_params(param = "metric_names")
   3.     └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/streams/metrics")
   4.       └─jsonlite:::parse_and_simplify(...)
   5.         └─jsonlite:::parseJSON(txt, bigint_as_char)
   6.           └─jsonlite:::parse_con(txt, bigint_as_char)
   7.             ├─base::open(con, "rb")
   8.             └─base::open.connection(con, "rb")
  ── Error ('test-sc_getdata.R:11:3'): sc_get_data for multiple COMIDs and areas and metrics returns a data frame ──
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/streams/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::sc_get_data(...) at test-sc_getdata.R:11:3
   2.   └─StreamCatTools::sc_get_params(param = "metric_names")
   3.     └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/streams/metrics")
   4.       └─jsonlite:::parse_and_simplify(...)
   5.         └─jsonlite:::parseJSON(txt, bigint_as_char)
   6.           └─jsonlite:::parse_con(txt, bigint_as_char)
   7.             ├─base::open(con, "rb")
   8.             └─base::open.connection(con, "rb")
  ── Error ('test-sc_getdata.R:20:3'): sc_get_data for showAreaSqKm and showPctFull returns a data frame ──
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/streams/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::sc_get_data(...) at test-sc_getdata.R:20:3
   2.   └─StreamCatTools::sc_get_params(param = "metric_names")
   3.     └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/streams/metrics")
   4.       └─jsonlite:::parse_and_simplify(...)
   5.         └─jsonlite:::parseJSON(txt, bigint_as_char)
   6.           └─jsonlite:::parse_con(txt, bigint_as_char)
   7.             ├─base::open(con, "rb")
   8.             └─base::open.connection(con, "rb")
  ── Error ('test-sc_getdata.R:28:3'): sc_get_data for a hydroregion and ws metrics returns a data frame ──
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/streams/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::sc_get_data(...) at test-sc_getdata.R:28:3
   2.   └─StreamCatTools::sc_get_params(param = "metric_names")
   3.     └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/streams/metrics")
   4.       └─jsonlite:::parse_and_simplify(...)
   5.         └─jsonlite:::parseJSON(txt, bigint_as_char)
   6.           └─jsonlite:::parse_con(txt, bigint_as_char)
   7.             ├─base::open(con, "rb")
   8.             └─base::open.connection(con, "rb")
  ── Error ('test-sc_getdata.R:36:3'): sc_get_data for a county and ws metrics returns a data frame ──
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/streams/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::sc_get_data(...) at test-sc_getdata.R:36:3
   2.   └─StreamCatTools::sc_get_params(param = "metric_names")
   3.     └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/streams/metrics")
   4.       └─jsonlite:::parse_and_simplify(...)
   5.         └─jsonlite:::parseJSON(txt, bigint_as_char)
   6.           └─jsonlite:::parse_con(txt, bigint_as_char)
   7.             ├─base::open(con, "rb")
   8.             └─base::open.connection(con, "rb")
  ── Error ('test-sc_getdata.R:44:3'): sc_get_data for all ws metrics for a COMID returns a data frame ──
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/streams/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::sc_get_data(...) at test-sc_getdata.R:44:3
   2.   └─StreamCatTools::sc_get_params(param = "metric_names")
   3.     └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/streams/metrics")
   4.       └─jsonlite:::parse_and_simplify(...)
   5.         └─jsonlite:::parseJSON(txt, bigint_as_char)
   6.           └─jsonlite:::parse_con(txt, bigint_as_char)
   7.             ├─base::open(con, "rb")
   8.             └─base::open.connection(con, "rb")
  ── Error ('test-sc_nlcd.R:5:13'): sc_get_data for a sample COMID returns a data frame ──
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/streams/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::sc_nlcd(year = "2019", aoi = "cat", comid = "179,1337,1337420") at test-sc_nlcd.R:5:13
   2.   └─StreamCatTools::sc_get_data(...)
   3.     └─StreamCatTools::sc_get_params(param = "metric_names")
   4.       └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/streams/metrics")
   5.         └─jsonlite:::parse_and_simplify(...)
   6.           └─jsonlite:::parseJSON(txt, bigint_as_char)
   7.             └─jsonlite:::parse_con(txt, bigint_as_char)
   8.               ├─base::open(con, "rb")
   9.               └─base::open.connection(con, "rb")
  ── Error ('test-sc_nlcd.R:13:3'): sc_get_data for a county and ws metrics returns a data frame ──
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/streams/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::sc_nlcd(year = "2006, 2019", aoi = "ws", county = "41003") at test-sc_nlcd.R:13:3
   2.   └─StreamCatTools::sc_get_data(...)
   3.     └─StreamCatTools::sc_get_params(param = "metric_names")
   4.       └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/streams/metrics")
   5.         └─jsonlite:::parse_and_simplify(...)
   6.           └─jsonlite:::parseJSON(txt, bigint_as_char)
   7.             └─jsonlite:::parse_con(txt, bigint_as_char)
   8.               ├─base::open(con, "rb")
   9.               └─base::open.connection(con, "rb")
  
  [ FAIL 25 | WARN 25 | SKIP 0 | PASS 6 ]
  Error: Test failures
  Execution halted