2021-08-19 04:04:51 +00:00
|
|
|
# Download the JDBC drivers used in the tests
|
|
|
|
|
2021-08-19 04:25:02 +00:00
|
|
|
# oldJarFolder <- Sys.getenv("DATABASECONNECTOR_JAR_FOLDER")
|
2021-08-19 11:35:41 +00:00
|
|
|
|
|
|
|
driverPath <- file.path(Sys.getenv("HOME"), "drivers")
|
|
|
|
if(!dir.exists(driverPath)) dir.create(driverPath)
|
|
|
|
Sys.setenv("DATABASECONNECTOR_JAR_FOLDER" = driverPath)
|
|
|
|
DatabaseConnector::downloadJdbcDrivers("postgresql", pathToDriver = driverPath)
|
|
|
|
|
|
|
|
print(Sys.getenv("DATABASECONNECTOR_JAR_FOLDER"))
|
2021-08-19 11:47:49 +00:00
|
|
|
print(list.files(driverPath))
|
2021-08-19 11:35:41 +00:00
|
|
|
# if(Sys.getenv("DATABASECONNECTOR_JAR_FOLDER") == "") {
|
|
|
|
# driverPath <- file.path(Sys.getenv("HOME"), "drivers")
|
|
|
|
# }
|
2021-08-19 04:04:51 +00:00
|
|
|
# downloadJdbcDrivers("sql server")
|
|
|
|
# downloadJdbcDrivers("oracle")
|
|
|
|
|
2021-08-19 04:25:02 +00:00
|
|
|
# withr::defer({
|
|
|
|
# unlink(Sys.getenv("DATABASECONNECTOR_JAR_FOLDER"), recursive = TRUE, force = TRUE)
|
|
|
|
# Sys.setenv("DATABASECONNECTOR_JAR_FOLDER" = oldJarFolder)
|
|
|
|
# }, testthat::teardown_env())
|