Skip to content

Commit

Permalink
fix(helper-setup): Remove invalid connections
Browse files Browse the repository at this point in the history
  • Loading branch information
RasmusSkytte committed Feb 22, 2024
1 parent 46e591d commit 236119e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions testthat/helper-setup.R
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,11 @@ get_test_conns <- function() {
# Open connections
test_conns <- names(conn_list) |>
purrr::map(~ do.call(get_driver, c(list(x = purrr::pluck(conn_list, .)), purrr::pluck(conn_args, .)))) |>
stats::setNames(names(conn_list))
stats::setNames(names(conn_list)) |>
purrr::discard(is.null)

# Run post_connect commands on the connections
purrr::walk2(test_conns, names(conn_list),
purrr::walk2(test_conns, names(test_conns),
\(conn, conn_name) purrr::walk(purrr::pluck(conn_post_connect, conn_name), ~ DBI::dbExecute(conn, .)))


Expand Down

0 comments on commit 236119e

Please sign in to comment.