Running ‘testthat.R’ [5s/6s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(sqltargets)
  > 
  > test_check("sqltargets")
  [ FAIL 3 | WARN 0 | SKIP 0 | PASS 5 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-tar-sql-deps.R:18:3'): tar_sql_deps() works ────────────────────
  Error: Error running targets::tar_make()
  Error messages: targets::tar_meta(fields = error, complete_only = TRUE)
  Debugging guide: https://books.ropensci.org/targets/debugging.html
  How to ask for help: https://books.ropensci.org/targets/help.html
  Last error message:
      is.environment(.envir) is not TRUE
  Last error traceback:
      sqltargets::tar_sql_exec(args = list(path = "query.sql", params = list()...
      do.call(what = source_sql_to_dataframe, args = args)
      (function (path, params = NULL)  {     connection_string <- stringr::str...
      glue::glue_sql(query, .con = con, .open = sqltargets_option_get("sqltarg...
      DBI::SQL(glue(..., .sep = .sep, .envir = .envir, .open = .open,      .cl...
      glue(..., .sep = .sep, .envir = .envir, .open = .open, .close = .close, ...
      glue_data(.x = NULL, ..., .sep = .sep, .envir = .envir, .open = .open,  ...
      stopifnot(is.environment(.envir))
      stop(simpleError(msg, call = if (p <- sys.parent(1L)) sys.call(p)))
      (function (condition)  {     state$error <- build_message(condition)    ...
  Backtrace:
      ▆
   1. ├─base::suppressMessages(targets::tar_make(callr_function = NULL)) at test-tar-sql-deps.R:18:3
   2. │ └─base::withCallingHandlers(...)
   3. └─targets::tar_make(callr_function = NULL)
   4.   └─targets:::callr_outer(...)
   5.     ├─targets:::if_any(...)
   6.     └─targets:::callr_error(traced_condition = out, fun = fun)
   7.       └─targets::tar_throw_run(message, class = class(traced_condition$condition))
   8.         └─targets::tar_error(...)
   9.           └─rlang::abort(message = message, class = class, call = tar_empty_envir)
  ── Error ('test-tar-sql.R:16:3'): tar_sql() works ──────────────────────────────
  Error: Error running targets::tar_make()
  Error messages: targets::tar_meta(fields = error, complete_only = TRUE)
  Debugging guide: https://books.ropensci.org/targets/debugging.html
  How to ask for help: https://books.ropensci.org/targets/help.html
  Last error message:
      is.environment(.envir) is not TRUE
  Last error traceback:
      sqltargets::tar_sql_exec(args = list(path = "query.sql", params = list()...
      do.call(what = source_sql_to_dataframe, args = args)
      (function (path, params = NULL)  {     connection_string <- stringr::str...
      glue::glue_sql(query, .con = con, .open = sqltargets_option_get("sqltarg...
      DBI::SQL(glue(..., .sep = .sep, .envir = .envir, .open = .open,      .cl...
      glue(..., .sep = .sep, .envir = .envir, .open = .open, .close = .close, ...
      glue_data(.x = NULL, ..., .sep = .sep, .envir = .envir, .open = .open,  ...
      stopifnot(is.environment(.envir))
      stop(simpleError(msg, call = if (p <- sys.parent(1L)) sys.call(p)))
      (function (condition)  {     state$error <- build_message(condition)    ...
  Backtrace:
      ▆
   1. ├─base::suppressMessages(targets::tar_make(callr_function = NULL)) at test-tar-sql.R:16:3
   2. │ └─base::withCallingHandlers(...)
   3. └─targets::tar_make(callr_function = NULL)
   4.   └─targets:::callr_outer(...)
   5.     ├─targets:::if_any(...)
   6.     └─targets:::callr_error(traced_condition = out, fun = fun)
   7.       └─targets::tar_throw_run(message, class = class(traced_condition$condition))
   8.         └─targets::tar_error(...)
   9.           └─rlang::abort(message = message, class = class, call = tar_empty_envir)
  ── Error ('test-tar-sql.R:58:3'): tar_sql() with glue engine ───────────────────
  Error: Error running targets::tar_make()
  Error messages: targets::tar_meta(fields = error, complete_only = TRUE)
  Debugging guide: https://books.ropensci.org/targets/debugging.html
  How to ask for help: https://books.ropensci.org/targets/help.html
  Last error message:
      is.environment(.envir) is not TRUE
  Last error traceback:
      sqltargets::tar_sql_exec(args = list(path = "query.sql", params = params...
      do.call(what = source_sql_to_dataframe, args = args)
      (function (path, params = NULL)  {     connection_string <- stringr::str...
      glue::glue_sql(query, .con = con, .open = sqltargets_option_get("sqltarg...
      DBI::SQL(glue(..., .sep = .sep, .envir = .envir, .open = .open,      .cl...
      glue(..., .sep = .sep, .envir = .envir, .open = .open, .close = .close, ...
      glue_data(.x = NULL, ..., .sep = .sep, .envir = .envir, .open = .open,  ...
      stopifnot(is.environment(.envir))
      stop(simpleError(msg, call = if (p <- sys.parent(1L)) sys.call(p)))
      (function (condition)  {     state$error <- build_message(condition)    ...
  Backtrace:
      ▆
   1. ├─base::suppressMessages(targets::tar_make(callr_function = NULL)) at test-tar-sql.R:58:3
   2. │ └─base::withCallingHandlers(...)
   3. └─targets::tar_make(callr_function = NULL)
   4.   └─targets:::callr_outer(...)
   5.     ├─targets:::if_any(...)
   6.     └─targets:::callr_error(traced_condition = out, fun = fun)
   7.       └─targets::tar_throw_run(message, class = class(traced_condition$condition))
   8.         └─targets::tar_error(...)
   9.           └─rlang::abort(message = message, class = class, call = tar_empty_envir)
  
  [ FAIL 3 | WARN 0 | SKIP 0 | PASS 5 ]
  Error: Test failures
  Execution halted