From 37c44062181973565914abbeb0edbcb3077441fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rasmus=20Skytte=20Randl=C3=B8v?= Date: Fri, 26 Jul 2024 10:37:29 +0200 Subject: [PATCH] test(Logger): Check that catalog is witten on backends that support it --- tests/testthat/test-Logger.R | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/testthat/test-Logger.R b/tests/testthat/test-Logger.R index cf614fb0..3c1b7ef1 100644 --- a/tests/testthat/test-Logger.R +++ b/tests/testthat/test-Logger.R @@ -189,6 +189,9 @@ test_that("Logger: logging to database works", { # Test Logger has pre-filled some information in the logs db_table_id <- id(db_table, conn) expect_identical(as.character(dplyr::pull(log_table_id, "date")), timestamp) + if ("catalog" %in% purrr::pluck(db_table_id, "name", names)) { + expect_identical(dplyr::pull(log_table_id, "catalog"), purrr::pluck(db_table_id, "name", "catalog")) + } expect_identical(dplyr::pull(log_table_id, "schema"), purrr::pluck(db_table_id, "name", "schema")) expect_identical(dplyr::pull(log_table_id, "table"), purrr::pluck(db_table_id, "name", "table")) expect_identical( # Transferring start_time to database can have some loss of information that we need to match