Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions tests/testthat/test-driver-snowflake.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@ test_that("odbcConnectionSchemas lists only the given catalog's schemas", {
}

con <- test_con("SNOWFLAKE")
# The session may not have a current database or warehouse, so use SHOW.
catalog <- dbGetQuery(con, "SELECT CURRENT_DATABASE()")[[1]]
if (is.na(catalog)) {
catalog <- odbcConnectionCatalogs(con)[[1]]
}
expected <- dbGetQuery(
con,
"SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA"
)[[1]]
paste("SHOW SCHEMAS IN DATABASE", dbQuoteIdentifier(con, catalog))
)$name

expect_setequal(odbcConnectionSchemas(con, catalog_name = catalog), expected)
})
Expand Down
Loading