Skip to content

Commit

Permalink
add test for duckdb without specifying pathToDriver or JAR folder
Browse files Browse the repository at this point in the history
  • Loading branch information
egillax committed Oct 15, 2023
1 parent 70ce98f commit 57dbb72
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/testthat/test-duckdb.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@ test_that("Open and close duckdb connection", {
unlink(databaseFile)
})

test_that("Open and close duckdb without DATABASECONNECTOR_JAR_FOLDER", {
withr::with_envvar(
new=c("DATABASECONNECTOR_JAR_FOLDER"=""),
{
databaseFile <- tempfile()
connection <- DatabaseConnector::connect(dbms = "duckdb", server = databaseFile)
expect_s4_class(connection, "DatabaseConnectorDbiConnection")
disconnect(connection)
unlink(databaseFile)
}

)
})

test_that("Insert and retrieve dates from duckdb", {
databaseFile <- tempfile()
connection <- DatabaseConnector::connect(dbms = "duckdb", server = databaseFile)
Expand Down

0 comments on commit 57dbb72

Please sign in to comment.