download drivers before running tests
This commit is contained in:
parent
a6366dff4a
commit
d17830759e
|
@ -21,7 +21,8 @@ Imports:
|
||||||
Suggests:
|
Suggests:
|
||||||
knitr,
|
knitr,
|
||||||
testthat (>= 3.0.0),
|
testthat (>= 3.0.0),
|
||||||
RSQLite
|
RSQLite,
|
||||||
|
withr
|
||||||
NeedsCompilation: no
|
NeedsCompilation: no
|
||||||
RoxygenNote: 7.1.1
|
RoxygenNote: 7.1.1
|
||||||
Config/testthat/edition: 3
|
Config/testthat/edition: 3
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
# Download the JDBC drivers used in the tests
|
||||||
|
|
||||||
|
oldJarFolder <- Sys.getenv("DATABASECONNECTOR_JAR_FOLDER")
|
||||||
|
Sys.setenv("DATABASECONNECTOR_JAR_FOLDER" = tempfile("jdbcDrivers"))
|
||||||
|
downloadJdbcDrivers("postgresql")
|
||||||
|
# downloadJdbcDrivers("sql server")
|
||||||
|
# downloadJdbcDrivers("oracle")
|
||||||
|
|
||||||
|
withr::defer({
|
||||||
|
unlink(Sys.getenv("DATABASECONNECTOR_JAR_FOLDER"), recursive = TRUE, force = TRUE)
|
||||||
|
Sys.setenv("DATABASECONNECTOR_JAR_FOLDER" = oldJarFolder)
|
||||||
|
}, testthat::teardown_env())
|
Loading…
Reference in New Issue