diff --git a/R/default.R b/R/default.R index 532ba00f..f848e1fe 100644 --- a/R/default.R +++ b/R/default.R @@ -42,5 +42,10 @@ mariadbDefault <- function() { } mariadb_default <- function(...) { - dbConnect(MariaDB(), dbname = "test", ...) + rlang::inject(dbConnect(MariaDB(), !!!mariadb_default_args, ...)) } + +mariadb_default_args <- as.list(c( + dbname = "test", + NULL +)) diff --git a/tests/testthat/helper-DBItest.R b/tests/testthat/helper-DBItest.R index de6b76f6..8c65f102 100644 --- a/tests/testthat/helper-DBItest.R +++ b/tests/testthat/helper-DBItest.R @@ -1,8 +1,8 @@ DBItest::make_context( MariaDB(), - list( - dbname = "test", - load_data_local_infile = (Sys.getenv("RMARIADB_LOAD_DATA_LOCAL_INFILE") != "") + c( + mariadb_default_args, + list(load_data_local_infile = (Sys.getenv("RMARIADB_LOAD_DATA_LOCAL_INFILE") != "")) ), tweaks = DBItest::tweaks( dbitest_version = "1.7.2",