Running 'spelling.R' [0s]
  Running 'testthat.R' [34s]
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(SCDB)
  
  Attaching package: 'SCDB'
  
  The following object is masked from 'package:base':
  
      nrow
  
  > 
  > # Run the test using the default system connection
  > test_check("SCDB")
  [conflicted] Will prefer SCDB::id over any other package.
  No useful drivers (other than SQLite) were found!
  #####
  Following drivers will be tested:
    RSQLite::SQLite (SQLite)
  
  Following drivers were not found and will NOT be tested:
    RPostgres::Postgres (PostgreSQL)
    odbc::odbc (MSSQL)
  #####
  Error in `purrr::map_chr()`:
  i In index: 2.
  Caused by error:
  ! invalid 'envir' argument of type 'character'
  Backtrace:
       x
    1. +-testthat::expect_mapequal(...) at test-db_manipulating_functions.R:34:3
    2. | \-testthat::quasi_label(enquo(object), arg = "object")
    3. |   \-rlang::eval_bare(expr, quo_get_env(quo))
    4. +-dplyr::collect(...)
    5. +-dbplyr:::collect.tbl_sql(...)
    6. | \-dbplyr::db_sql_render(x$src$con, x, cte = cte)
    7. |   +-dbplyr::db_sql_render(con, sql, ..., sql_options = sql_options)
    8. |   \-dbplyr:::db_sql_render.DBIConnection(con, sql, ..., sql_options = sql_options)
    9. |     +-dbplyr::sql_render(sql, con = con, ..., sql_options = sql_options)
   10. |     \-dbplyr:::sql_render.tbl_lazy(sql, con = con, ..., sql_options = sql_options)
   11. |       +-dbplyr::sql_render(...)
   12. |       \-dbplyr:::sql_render.lazy_query(...)
   13. |         +-dbplyr::sql_build(query, con = con, sql_options = sql_options)
   14. |         \-dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   15. |           +-dbplyr::sql_build(op$x, con, sql_options = sql_options)
   16. |           \-dbplyr:::sql_build.lazy_select_query(op$x, con, sql_options = sql_options)
   17. |             \-dbplyr:::get_select_sql(...)
   18. |               \-dbplyr:::translate_select_sql(con, select)
   19. |                 \-dbplyr::translate_sql_(...)
   20. |                   \-dbplyr:::dbplyr_sql_translation(con)
   21. |                     \-dbplyr:::dbplyr_fallback(con, "sql_translate_env")
   22. |                       +-rlang::eval_bare(expr((!!fun)(con, ...)))
   23. |                       \-dbplyr:::sql_translate_env.DBIConnection(con, ...)
   24. |                         +-dbplyr::sql_translation(con)
   25. |                         \-dbplyr:::sql_translation.SQLiteConnection(con)
   26. |                           \-dbplyr::sql_variant(...)
   27. |                             +-generics::setdiff(ls(aggregate), ls(window))
   28. |                             \-generics:::setdiff.default(ls(aggregate), ls(window))
   29. |                               \-base::setdiff(x, y, ...)
   30. |                                 +-base::duplicated(unclass(u))
   31. |                                 \-base::duplicated.default(unclass(u))
   32. +-`<fn>`(`<Logger>`)
   33. | \-.subset2(e, "finalize")()
   34. |   +-dbplyr::build_sql(...)
   35. |   | \-purrr::map_chr(enexprs(...), escape_expr, con = con)
   36. |   |   \-purrr:::map_("character", .x, .f, ..., .progress = .progress)
   37. |   |     +-purrr:::with_indexed_errors(...)
   38. |   |     | \-base::withCallingHandlers(...)
   39. |   |     +-purrr:::call_with_cleanup(...)
   40. |   |     \-dbplyr (local) .f(.x[[i]], ...)
   41. |   |       \-rlang::eval_bare(x, .env)
   42. |   +-dbplyr::as.sql(id(self$log_tbl, conn = private$log_conn), con = private$log_conn)
   43. |   +-SCDB::id(self$log_tbl, conn = private$log_conn)
   44. |   \-SCDB:::id.tbl_dbi(self$log_tbl, conn = private$log_conn)
   45. |     +-base::with(...)
   46. |     \-base::with.default(...)
   47. |       \-base::eval(substitute(expr), data, enclos = parent.frame())
   48. \-base::.handleSimpleError(...)
   49.   \-purrr (local) h(simpleError(msg, call))
   50.     \-cli::cli_abort(...)
   51.       \-rlang::abort(...)
  Error in `purrr::map_chr()`:
  i In index: 2.
  Caused by error:
  ! invalid 'envir' argument of type 'character'
  Backtrace:
       x
    1. +-testthat::expect_mapequal(...) at test-db_manipulating_functions.R:34:3
    2. | \-testthat::quasi_label(enquo(object), arg = "object")
    3. |   \-rlang::eval_bare(expr, quo_get_env(quo))
    4. +-dplyr::collect(...)
    5. +-dbplyr:::collect.tbl_sql(...)
    6. | \-dbplyr::db_sql_render(x$src$con, x, cte = cte)
    7. |   +-dbplyr::db_sql_render(con, sql, ..., sql_options = sql_options)
    8. |   \-dbplyr:::db_sql_render.DBIConnection(con, sql, ..., sql_options = sql_options)
    9. |     +-dbplyr::sql_render(sql, con = con, ..., sql_options = sql_options)
   10. |     \-dbplyr:::sql_render.tbl_lazy(sql, con = con, ..., sql_options = sql_options)
   11. |       +-dbplyr::sql_render(...)
   12. |       \-dbplyr:::sql_render.lazy_query(...)
   13. |         +-dbplyr::sql_build(query, con = con, sql_options = sql_options)
   14. |         \-dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   15. |           +-dbplyr::sql_build(op$x, con, sql_options = sql_options)
   16. |           \-dbplyr:::sql_build.lazy_select_query(op$x, con, sql_options = sql_options)
   17. |             \-dbplyr:::get_select_sql(...)
   18. |               \-dbplyr:::translate_select_sql(con, select)
   19. |                 \-dbplyr::translate_sql_(...)
   20. |                   \-dbplyr:::dbplyr_sql_translation(con)
   21. |                     \-dbplyr:::dbplyr_fallback(con, "sql_translate_env")
   22. |                       +-rlang::eval_bare(expr((!!fun)(con, ...)))
   23. |                       \-dbplyr:::sql_translate_env.DBIConnection(con, ...)
   24. |                         +-dbplyr::sql_translation(con)
   25. |                         \-dbplyr:::sql_translation.SQLiteConnection(con)
   26. |                           \-dbplyr::sql_variant(...)
   27. |                             +-generics::setdiff(ls(aggregate), ls(window))
   28. |                             \-generics:::setdiff.default(ls(aggregate), ls(window))
   29. |                               \-base::setdiff(x, y, ...)
   30. |                                 +-base::duplicated(unclass(u))
   31. |                                 \-base::duplicated.default(unclass(u))
   32. +-`<fn>`(`<Logger>`)
   33. | \-.subset2(e, "finalize")()
   34. |   +-dbplyr::build_sql(...)
   35. |   | \-purrr::map_chr(enexprs(...), escape_expr, con = con)
   36. |   |   \-purrr:::map_("character", .x, .f, ..., .progress = .progress)
   37. |   |     +-purrr:::with_indexed_errors(...)
   38. |   |     | \-base::withCallingHandlers(...)
   39. |   |     +-purrr:::call_with_cleanup(...)
   40. |   |     \-dbplyr (local) .f(.x[[i]], ...)
   41. |   |       \-rlang::eval_bare(x, .env)
   42. |   +-dbplyr::as.sql(id(self$log_tbl, conn = private$log_conn), con = private$log_conn)
   43. |   +-SCDB::id(self$log_tbl, conn = private$log_conn)
   44. |   \-SCDB:::id.tbl_dbi(self$log_tbl, conn = private$log_conn)
   45. |     +-base::with(...)
   46. |     \-base::with.default(...)
   47. |       \-base::eval(substitute(expr), data, enclos = parent.frame())
   48. \-base::.handleSimpleError(...)
   49.   \-purrr (local) h(simpleError(msg, call))
   50.     \-cli::cli_abort(...)
   51.       \-rlang::abort(...)
  [ FAIL 4 | WARN 1 | SKIP 0 | PASS 294 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-Logger.R:72:3'): Logger works ──────────────────────────────────
  Error in `h(simpleError(msg, call))`: error in evaluating the argument 'name' in selecting a method for function 'dbRemoveTable': invalid 'envir' argument of type 'character'
  Backtrace:
      ▆
   1. ├─logger$log_to_db(n_insertions = 42) at test-Logger.R:72:3
   2. │ ├─DBI::dbRemoveTable(...)
   3. │ ├─SCDB::id(patch, conn = private$log_conn, allow_table_only = FALSE)
   4. │ └─SCDB:::id.tbl_dbi(patch, conn = private$log_conn, allow_table_only = FALSE)
   5. │   ├─base::with(...)
   6. │   └─base::with.default(...)
   7. │     └─base::eval(substitute(expr), data, enclos = parent.frame())
   8. └─base::.handleSimpleError(...)
   9.   └─base (local) h(simpleError(msg, call))
  ── Error ('test-Logger.R:209:5'): Logger sets log_file to NULL in DB if not writing to file ──
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `purrr::map_chr(enexprs(...), escape_expr, con = con)`: i In index: 2.
  Caused by error:
  ! invalid 'envir' argument of type 'character'
  Backtrace:
       ▆
    1. ├─logger$finalize() at test-Logger.R:209:5
    2. │ ├─dbplyr::build_sql(...)
    3. │ │ └─purrr::map_chr(enexprs(...), escape_expr, con = con)
    4. │ │   └─purrr:::map_("character", .x, .f, ..., .progress = .progress)
    5. │ │     ├─purrr:::with_indexed_errors(...)
    6. │ │     │ └─base::withCallingHandlers(...)
    7. │ │     ├─purrr:::call_with_cleanup(...)
    8. │ │     └─dbplyr (local) .f(.x[[i]], ...)
    9. │ │       └─rlang::eval_bare(x, .env)
   10. │ ├─dbplyr::as.sql(id(self$log_tbl, conn = private$log_conn), con = private$log_conn)
   11. │ ├─SCDB::id(self$log_tbl, conn = private$log_conn)
   12. │ └─SCDB:::id.tbl_dbi(self$log_tbl, conn = private$log_conn)
   13. │   ├─base::with(...)
   14. │   └─base::with.default(...)
   15. │     └─base::eval(substitute(expr), data, enclos = parent.frame())
   16. └─base::.handleSimpleError(...)
   17.   └─purrr (local) h(simpleError(msg, call))
   18.     └─cli::cli_abort(...)
   19.       └─rlang::abort(...)
  ── Error ('test-connection.R:45:3'): id() is consistent for DBI connections ────
  Error in `eval(substitute(expr), data, enclos = parent.frame())`: invalid 'envir' argument of type 'character'
  Backtrace:
      ▆
   1. ├─SCDB::id(dplyr::tbl(conn, DBI::Id(schema = "test", table = "mtcars"))) at test-connection.R:45:3
   2. └─SCDB:::id.tbl_dbi(dplyr::tbl(conn, DBI::Id(schema = "test", table = "mtcars")))
   3.   ├─base::with(...)
   4.   └─base::with.default(...)
   5.     └─base::eval(substitute(expr), data, enclos = parent.frame())
  ── Error ('test-update_snapshot.R:39:3'): update_snapshot() works ──────────────
  Error in `db_copy_to(dest$con, name, df, overwrite = overwrite, types = types, 
      temporary = temporary, unique_indexes = unique_indexes, indexes = indexes, 
      analyze = analyze, in_transaction = in_transaction, ...)`: Can't copy data to table `SCDB_log_patch`.
  Caused by error in `dplyr::db_write_table()`:
  ! Can't write table table `SCDB_log_patch`.
  Caused by error:
  ! Table `SCDB_log_patch` exists in database, and both overwrite and append are FALSE
  
  [ FAIL 4 | WARN 1 | SKIP 0 | PASS 294 ]
  Error: Test failures
  Execution halted