Running ‘testthat.R’ [2s/13s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > test_check('sbtools')
  Loading required package: sbtools
  ── 1. Failure: generic post fails w/o auth (@test-REST.R#5)  ───────────────────
  `item_append_files("54e265a4e4b08de9379b4dfb", "/foo/bar/baz.zip")` threw an error with unexpected message.
  Expected match: "Item not found for"
  Actual message: "GET failed to https://www.sciencebase.gov/catalog/item/54e265a4e4b08de9379b4dfb. check authorization and/or content"
  Backtrace:
    1. testthat::expect_error(...)
    6. sbtools::item_append_files("54e265a4e4b08de9379b4dfb", "/foo/bar/baz.zip")
    8. sbtools:::as.sbitem.character(sb_id)
    9. sbtools:::get_item(x, ...)
   10. sbtools::sbtools_GET(...)
   11. sbtools:::handle_errors(r, url, "GET", supported_types)
  
  ── 2. Failure: generic post fails w/o auth (@test-REST.R#10)  ──────────────────
  `item_append_files(...)` threw an error with unexpected message.
  Expected match: "Item not found for"
  Actual message: "GET failed to https://www.sciencebase.gov/catalog/item/54e265a4e4b08de9379b4dfb. check authorization and/or content"
  Backtrace:
    1. testthat::expect_error(...)
    6. sbtools::item_append_files(...)
    8. sbtools:::as.sbitem.character(sb_id)
    9. sbtools:::get_item(x, ...)
   10. sbtools::sbtools_GET(...)
   11. sbtools:::handle_errors(r, url, "GET", supported_types)
  
  ── 3. Failure: generic post fails w/o auth (@test-REST.R#14)  ──────────────────
  `item_append_files("54e265a4e4b08de9379b4dfb", files, session = session)` threw an error with unexpected message.
  Expected match: "Item not found for"
  Actual message: "GET failed to https://www.sciencebase.gov/catalog/item/54e265a4e4b08de9379b4dfb. check authorization and/or content"
  Backtrace:
    1. testthat::expect_error(...)
    6. sbtools::item_append_files(...)
    8. sbtools:::as.sbitem.character(sb_id)
    9. sbtools:::get_item(x, ...)
   10. sbtools::sbtools_GET(...)
   11. sbtools:::handle_errors(r, url, "GET", supported_types)
  
  ── 4. Error: generic get w/ and w/o auth (@test-REST.R#29)  ────────────────────
  GET failed to https://www.sciencebase.gov/catalog/item/4f4e4a62e4b07f02db636b68. check authorization and/or content
  Backtrace:
    1. testthat::expect_is(item_get(public_item, session = NULL), "sbitem")
    4. sbtools::item_get(public_item, session = NULL)
    5. sbtools:::get_item(as.sbitem(sb_id)$id, ..., session = session)
    6. sbtools::sbtools_GET(...)
    7. base::tryCatch(...)
    8. base:::tryCatchList(expr, classes, parentenv, handlers)
    9. base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   10. value[[3L]](cond)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 8 | SKIPPED: 3 | WARNINGS: 2 | FAILED: 4 ]
  1. Failure: generic post fails w/o auth (@test-REST.R#5) 
  2. Failure: generic post fails w/o auth (@test-REST.R#10) 
  3. Failure: generic post fails w/o auth (@test-REST.R#14) 
  4. Error: generic get w/ and w/o auth (@test-REST.R#29) 
  
  Error: testthat unit tests failed
  Execution halted