Skip to content

Commit

Permalink
2nd try
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonysena committed Sep 19, 2023
1 parent 118933c commit 2d1ac30
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions tests/testthat/test-Strategus.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,25 @@ test_that("Run unit test study", {

# Only run this code if we're testing on SQLite
# AND we're not running code coverage checks
if (dbms == "sqlite" && identical(tolower(Sys.getenv("R_COVR")), "false")) {
if (dbms == "sqlite" && !identical(tolower(Sys.getenv("R_COVR")), "true")) {
resultsConnectionDetailsReference <- "result-store"
resultsDatabaseSchema <- "main"
Strategus::storeConnectionDetails(
connectionDetails,
resultsConnectionDetailsReference,
keyringName = keyringName
)
resultsExecutionSettings <- Strategus::createResultsExecutionSettings(
resultsConnectionDetailsReference = resultsConnectionDetailsReference,
resultsDatabaseSchema = resultsDatabaseSchema,
workFolder = workFolder,
resultsFolder = resultsFolder
)
Strategus::createResultDataModels(
analysisSpecifications = analysisSpecifications,
executionSettings = resultsExecutionSettings,
keyringName = keyringName
)
}

executionSettings <- createCdmExecutionSettings(
Expand Down Expand Up @@ -80,20 +91,6 @@ test_that("Run unit test study", {
fileName = file.path(studyRootFolder, "eunomiaExecutionSettings.json")
)

if (dbms == "sqlite") {
resultsExecutionSettings <- Strategus::createResultsExecutionSettings(
resultsConnectionDetailsReference = resultsConnectionDetailsReference,
resultsDatabaseSchema = resultsDatabaseSchema,
workFolder = workFolder,
resultsFolder = resultsFolder
)
Strategus::createResultDataModels(
analysisSpecifications = analysisSpecifications,
executionSettings = resultsExecutionSettings,
keyringName = keyringName
)
}

Strategus::execute(
analysisSpecifications = analysisSpecifications,
executionSettings = executionSettings,
Expand Down

0 comments on commit 2d1ac30

Please sign in to comment.