Skip to content

Commit 29955da

Browse files
authored
1.37.3 (patch) - Update tests for createDatabase for CI/CD
1 parent 0a05477 commit 29955da

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

tests/testthat/test.4_db.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ test_that("checking createDatabase functions (new schema)", {
2626
}
2727

2828
td <- tempdir()
29-
db_pth = createDatabase(pa = pa, xcmsObj = xcmsObj, outDir = td)
29+
db_pth = createDatabase(pa = pa, xcmsObj = xcmsObj, outDir = td,
30+
dbName = paste0("test-new-schema-", fn, "-", as.integer(Sys.time()), "-", sample.int(1e9, 1), ".sqlite"))
3031

3132
con <- DBI::dbConnect(RSQLite::SQLite(), file.path(db_pth))
3233

tests/testthat/test.4_db_OLD.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ test_that("checking createDatabase functions (new schema)", {
1717

1818

1919
td <- tempdir()
20-
db_pth = createDatabase(pa, xset, outDir = td)
20+
db_pth = createDatabase(pa, xset, outDir = td,
21+
dbName = paste0("test-new-schema-", as.integer(Sys.time()), "-", sample.int(1e9, 1), ".sqlite"))
2122

2223
con <- DBI::dbConnect(RSQLite::SQLite(), file.path(db_pth))
2324

@@ -56,7 +57,8 @@ test_that("checking create_database (old schema)", {
5657

5758

5859
td <- tempdir()
59-
db_pth = create_database(pa, xset, out_dir = td)
60+
db_pth = create_database(pa, xset, out_dir = td,
61+
db_name = paste0("test-old-schema-", as.integer(Sys.time()), "-", sample.int(1e9, 1), ".sqlite"))
6062

6163
con <- DBI::dbConnect(RSQLite::SQLite(), file.path(db_pth))
6264

0 commit comments

Comments
 (0)