Skip to content

Commit

Permalink
Only run execution test on Eunomia
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonysena committed Jan 16, 2024
1 parent 90bb5e4 commit b6b6bb6
Show file tree
Hide file tree
Showing 4 changed files with 453 additions and 453 deletions.
192 changes: 96 additions & 96 deletions tests/testthat/setup.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,102 +79,102 @@ connectionDetailsList[[length(connectionDetailsList) + 1]] <- list(
cohortTable = "cohort",
tempEmulationSchema = NULL
)

# PostgreSQL
if (!(Sys.getenv("CDM5_POSTGRESQL_USER") == "" &
Sys.getenv("CDM5_POSTGRESQL_PASSWORD") == "" &
Sys.getenv("CDM5_POSTGRESQL_SERVER") == "" &
Sys.getenv("CDM5_POSTGRESQL_CDM_SCHEMA") == "" &
Sys.getenv("CDM5_POSTGRESQL_OHDSI_SCHEMA") == "")) {
DatabaseConnector::downloadJdbcDrivers("postgresql")
connectionDetailsList[[length(connectionDetailsList) + 1]] <- list(
connectionDetails = DatabaseConnector::createConnectionDetails(
dbms = "postgresql",
user = Sys.getenv("CDM5_POSTGRESQL_USER"),
password = URLdecode(Sys.getenv("CDM5_POSTGRESQL_PASSWORD")),
server = Sys.getenv("CDM5_POSTGRESQL_SERVER"),
port = 5432,
pathToDriver = Sys.getenv("DATABASECONNECTOR_JAR_FOLDER")
),
cdmDatabaseSchema = Sys.getenv("CDM5_POSTGRESQL_CDM_SCHEMA"),
workDatabaseSchema = Sys.getenv("CDM5_POSTGRESQL_OHDSI_SCHEMA"),
vocabularyDatabaseSchema = Sys.getenv("CDM5_POSTGRESQL_CDM_SCHEMA"),
cohortTable = "cohort",
tempEmulationSchema = NULL
)
}

# Oracle
if (!(Sys.getenv("CDM5_ORACLE_USER") == "" &
Sys.getenv("CDM5_ORACLE_PASSWORD") == "" &
Sys.getenv("CDM5_ORACLE_SERVER") == "" &
Sys.getenv("CDM5_ORACLE_CDM_SCHEMA") == "" &
Sys.getenv("CDM5_ORACLE_OHDSI_SCHEMA") == "")) {
DatabaseConnector::downloadJdbcDrivers("oracle")
connectionDetailsList[[length(connectionDetailsList) + 1]] <- list(
connectionDetails = DatabaseConnector::createConnectionDetails(
dbms = "oracle",
user = Sys.getenv("CDM5_ORACLE_USER"),
password = URLdecode(Sys.getenv("CDM5_ORACLE_PASSWORD")),
server = Sys.getenv("CDM5_ORACLE_SERVER"),
port = 1521,
pathToDriver = Sys.getenv("DATABASECONNECTOR_JAR_FOLDER")
),
cdmDatabaseSchema = Sys.getenv("CDM5_ORACLE_CDM_SCHEMA"),
workDatabaseSchema = Sys.getenv("CDM5_ORACLE_OHDSI_SCHEMA"),
vocabularyDatabaseSchema = Sys.getenv("CDM5_ORACLE_CDM_SCHEMA"),
cohortTable = "cohort",
tempEmulationSchema = Sys.getenv("CDM5_ORACLE_OHDSI_SCHEMA")
)
}

# RedShift
if (!(Sys.getenv("CDM5_REDSHIFT_USER") == "" &
Sys.getenv("CDM5_REDSHIFT_PASSWORD") == "" &
Sys.getenv("CDM5_REDSHIFT_SERVER") == "" &
Sys.getenv("CDM5_REDSHIFT_CDM_SCHEMA") == "" &
Sys.getenv("CDM5_REDSHIFT_OHDSI_SCHEMA") == "")) {
DatabaseConnector::downloadJdbcDrivers("redshift")
connectionDetailsList[[length(connectionDetailsList) + 1]] <- list(
connectionDetails = DatabaseConnector::createConnectionDetails(
dbms = "redshift",
user = Sys.getenv("CDM5_REDSHIFT_USER"),
password = URLdecode(Sys.getenv("CDM5_REDSHIFT_PASSWORD")),
server = Sys.getenv("CDM5_REDSHIFT_SERVER"),
port = 5439,
pathToDriver = Sys.getenv("DATABASECONNECTOR_JAR_FOLDER")
),
cdmDatabaseSchema = Sys.getenv("CDM5_REDSHIFT_CDM_SCHEMA"),
workDatabaseSchema = Sys.getenv("CDM5_REDSHIFT_OHDSI_SCHEMA"),
vocabularyDatabaseSchema = Sys.getenv("CDM5_REDSHIFT_CDM_SCHEMA"),
cohortTable = "cohort",
tempEmulationSchema = NULL
)
}

# SQL Server
if (!(Sys.getenv("CDM5_SQL_SERVER_USER") == "" &
Sys.getenv("CDM5_SQL_SERVER_PASSWORD") == "" &
Sys.getenv("CDM5_SQL_SERVER_SERVER") == "" &
Sys.getenv("CDM5_SQL_SERVER_CDM_SCHEMA") == "" &
Sys.getenv("CDM5_SQL_SERVER_OHDSI_SCHEMA") == "")) {
DatabaseConnector::downloadJdbcDrivers("sql server")
connectionDetailsList[[length(connectionDetailsList) + 1]] <- list(
connectionDetails = DatabaseConnector::createConnectionDetails(
dbms = "sql server",
user = Sys.getenv("CDM5_SQL_SERVER_USER"),
password = URLdecode(Sys.getenv("CDM5_SQL_SERVER_PASSWORD")),
server = Sys.getenv("CDM5_SQL_SERVER_SERVER"),
port = 1433,
pathToDriver = Sys.getenv("DATABASECONNECTOR_JAR_FOLDER")
),
cdmDatabaseSchema = Sys.getenv("CDM5_SQL_SERVER_CDM_SCHEMA"),
workDatabaseSchema = Sys.getenv("CDM5_SQL_SERVER_OHDSI_SCHEMA"),
vocabularyDatabaseSchema = Sys.getenv("CDM5_SQL_SERVER_CDM_SCHEMA"),
cohortTable = "cohort",
tempEmulationSchema = NULL
)
}
#
# # PostgreSQL
# if (!(Sys.getenv("CDM5_POSTGRESQL_USER") == "" &
# Sys.getenv("CDM5_POSTGRESQL_PASSWORD") == "" &
# Sys.getenv("CDM5_POSTGRESQL_SERVER") == "" &
# Sys.getenv("CDM5_POSTGRESQL_CDM_SCHEMA") == "" &
# Sys.getenv("CDM5_POSTGRESQL_OHDSI_SCHEMA") == "")) {
# DatabaseConnector::downloadJdbcDrivers("postgresql")
# connectionDetailsList[[length(connectionDetailsList) + 1]] <- list(
# connectionDetails = DatabaseConnector::createConnectionDetails(
# dbms = "postgresql",
# user = Sys.getenv("CDM5_POSTGRESQL_USER"),
# password = URLdecode(Sys.getenv("CDM5_POSTGRESQL_PASSWORD")),
# server = Sys.getenv("CDM5_POSTGRESQL_SERVER"),
# port = 5432,
# pathToDriver = Sys.getenv("DATABASECONNECTOR_JAR_FOLDER")
# ),
# cdmDatabaseSchema = Sys.getenv("CDM5_POSTGRESQL_CDM_SCHEMA"),
# workDatabaseSchema = Sys.getenv("CDM5_POSTGRESQL_OHDSI_SCHEMA"),
# vocabularyDatabaseSchema = Sys.getenv("CDM5_POSTGRESQL_CDM_SCHEMA"),
# cohortTable = "cohort",
# tempEmulationSchema = NULL
# )
# }
#
# # Oracle
# if (!(Sys.getenv("CDM5_ORACLE_USER") == "" &
# Sys.getenv("CDM5_ORACLE_PASSWORD") == "" &
# Sys.getenv("CDM5_ORACLE_SERVER") == "" &
# Sys.getenv("CDM5_ORACLE_CDM_SCHEMA") == "" &
# Sys.getenv("CDM5_ORACLE_OHDSI_SCHEMA") == "")) {
# DatabaseConnector::downloadJdbcDrivers("oracle")
# connectionDetailsList[[length(connectionDetailsList) + 1]] <- list(
# connectionDetails = DatabaseConnector::createConnectionDetails(
# dbms = "oracle",
# user = Sys.getenv("CDM5_ORACLE_USER"),
# password = URLdecode(Sys.getenv("CDM5_ORACLE_PASSWORD")),
# server = Sys.getenv("CDM5_ORACLE_SERVER"),
# port = 1521,
# pathToDriver = Sys.getenv("DATABASECONNECTOR_JAR_FOLDER")
# ),
# cdmDatabaseSchema = Sys.getenv("CDM5_ORACLE_CDM_SCHEMA"),
# workDatabaseSchema = Sys.getenv("CDM5_ORACLE_OHDSI_SCHEMA"),
# vocabularyDatabaseSchema = Sys.getenv("CDM5_ORACLE_CDM_SCHEMA"),
# cohortTable = "cohort",
# tempEmulationSchema = Sys.getenv("CDM5_ORACLE_OHDSI_SCHEMA")
# )
# }
#
# # RedShift
# if (!(Sys.getenv("CDM5_REDSHIFT_USER") == "" &
# Sys.getenv("CDM5_REDSHIFT_PASSWORD") == "" &
# Sys.getenv("CDM5_REDSHIFT_SERVER") == "" &
# Sys.getenv("CDM5_REDSHIFT_CDM_SCHEMA") == "" &
# Sys.getenv("CDM5_REDSHIFT_OHDSI_SCHEMA") == "")) {
# DatabaseConnector::downloadJdbcDrivers("redshift")
# connectionDetailsList[[length(connectionDetailsList) + 1]] <- list(
# connectionDetails = DatabaseConnector::createConnectionDetails(
# dbms = "redshift",
# user = Sys.getenv("CDM5_REDSHIFT_USER"),
# password = URLdecode(Sys.getenv("CDM5_REDSHIFT_PASSWORD")),
# server = Sys.getenv("CDM5_REDSHIFT_SERVER"),
# port = 5439,
# pathToDriver = Sys.getenv("DATABASECONNECTOR_JAR_FOLDER")
# ),
# cdmDatabaseSchema = Sys.getenv("CDM5_REDSHIFT_CDM_SCHEMA"),
# workDatabaseSchema = Sys.getenv("CDM5_REDSHIFT_OHDSI_SCHEMA"),
# vocabularyDatabaseSchema = Sys.getenv("CDM5_REDSHIFT_CDM_SCHEMA"),
# cohortTable = "cohort",
# tempEmulationSchema = NULL
# )
# }
#
# # SQL Server
# if (!(Sys.getenv("CDM5_SQL_SERVER_USER") == "" &
# Sys.getenv("CDM5_SQL_SERVER_PASSWORD") == "" &
# Sys.getenv("CDM5_SQL_SERVER_SERVER") == "" &
# Sys.getenv("CDM5_SQL_SERVER_CDM_SCHEMA") == "" &
# Sys.getenv("CDM5_SQL_SERVER_OHDSI_SCHEMA") == "")) {
# DatabaseConnector::downloadJdbcDrivers("sql server")
# connectionDetailsList[[length(connectionDetailsList) + 1]] <- list(
# connectionDetails = DatabaseConnector::createConnectionDetails(
# dbms = "sql server",
# user = Sys.getenv("CDM5_SQL_SERVER_USER"),
# password = URLdecode(Sys.getenv("CDM5_SQL_SERVER_PASSWORD")),
# server = Sys.getenv("CDM5_SQL_SERVER_SERVER"),
# port = 1433,
# pathToDriver = Sys.getenv("DATABASECONNECTOR_JAR_FOLDER")
# ),
# cdmDatabaseSchema = Sys.getenv("CDM5_SQL_SERVER_CDM_SCHEMA"),
# workDatabaseSchema = Sys.getenv("CDM5_SQL_SERVER_OHDSI_SCHEMA"),
# vocabularyDatabaseSchema = Sys.getenv("CDM5_SQL_SERVER_CDM_SCHEMA"),
# cohortTable = "cohort",
# tempEmulationSchema = NULL
# )
# }

# Keyring helpers --------------
# Set the keyring name & password for testing
Expand Down
Loading

0 comments on commit b6b6bb6

Please sign in to comment.