Running ‘testthat.R’ [12m/14m]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(DrugUtilisation)
  > 
  > dbToTest <- c(
  +   "duckdb"
  +   #,"sqlserver"
  +   #,"redshift"
  + )
  > 
  > availableConnections <- list(list(
  +   con = DBI::dbConnect(duckdb::duckdb(), ":memory:"),
  +   writeSchema = "main",
  +   cdmPrefix = NULL,
  +   writePrefix = NULL
  + ))
  > 
  > # if (Sys.getenv("CDM5_SQL_SERVER_USER") != "") {
  > #   availableConnections <- availableConnections %>%
  > #     append(value = list(list(
  > #       con = DBI::dbConnect(
  > #         odbc::odbc(),
  > #         Driver   = "ODBC Driver 18 for SQL Server",
  > #         Server   = Sys.getenv("CDM5_SQL_SERVER_SERVER"),
  > #         Database = Sys.getenv("CDM5_SQL_SERVER_CDM_DATABASE"),
  > #         UID      = Sys.getenv("CDM5_SQL_SERVER_USER"),
  > #         PWD      = Sys.getenv("CDM5_SQL_SERVER_PASSWORD"),
  > #         TrustServerCertificate = "yes",
  > #         Port     = 1433
  > #       ),
  > #       writeSchema = Sys.getenv("CDM5_SQL_SERVER_OHDSI_SCHEMA"),
  > #       mockPrefix = "test_dus_"
  > #     )))
  > # }
  > 
  > # if (Sys.getenv("CDM5_REDSHIFT_DBNAME") != "") {
  > #   availableConnections <- availableConnections %>%
  > #     append(value = list(list(
  > #       con = DBI::dbConnect(
  > #         RPostgres::Redshift(), dbname = Sys.getenv("CDM5_REDSHIFT_DBNAME"),
  > #         port = Sys.getenv("CDM5_REDSHIFT_PORT"),
  > #         host = Sys.getenv("CDM5_REDSHIFT_HOST"),
  > #         user = Sys.getenv("CDM5_REDSHIFT_USER"),
  > #         password = Sys.getenv("CDM5_REDSHIFT_PASSWORD")
  > #       ),
  > #       writeSchema = Sys.getenv("CDM5_REDSHIFT_SCRATCH_SCHEMA"),
  > #       mockPrefix = "test_dus_"
  > #     )))
  > # }
  > 
  > for (k in seq_along(availableConnections)) {
  +   # connection details
  +   connectionDetails <- availableConnections[[k]]
  +   # test code in that dbms
  +   test_check("DrugUtilisation")
  + }
  > measurement table not present in the cdm
  > procedure_occurrence table not present in the cdm
  > measurement table not present in the cdm
  > procedure_occurrence table not present in the cdm
  i This cdm contains non standard patterns please inform the mantainer of
  the package or open an issue in
  https://github.com/darwin-eu/DrugUtilisation so your new patterns could
  be supported
  [ FAIL 1 | WARN 2 | SKIP 14 | PASS 202 ]
  
  ══ Skipped tests (14) ══════════════════════════════════════════════════════════
  • On CRAN (14): 'test-dailyDose.R:2:3', 'test-drugUse.R:3:3',
    'test-drugUse.R:219:3', 'test-drugUse.R:443:3', 'test-drugUse.R:601:3',
    'test-drugUse.R:852:3', 'test-drugUse.R:901:3', 'test-drugUse.R:941:3',
    'test-generateDrugUtilisationCohortSet.R:51:3',
    'test-generateDrugUtilisationCohortSet.R:192:3',
    'test-generateDrugUtilisationCohortSet.R:239:3', 'test-indication.R:163:3',
    'test-indication.R:314:3', 'test-indication.R:422:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-indication.R:153:3'): test case single indication ────────────
  identical(...) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  
  [ FAIL 1 | WARN 2 | SKIP 14 | PASS 202 ]
  Error: Test failures
  Execution halted
  Warning messages:
  1: Connection is garbage-collected, use dbDisconnect() to avoid this. 
  2: Database is garbage-collected, use dbDisconnect(con, shutdown=TRUE) or duckdb::duckdb_shutdown(drv) to avoid this.