From 4952befdbb4f0610e27593d2f5eaebeb9192c77d Mon Sep 17 00:00:00 2001 From: "Zhian N. Kamvar (UMass)" Date: Tue, 8 Oct 2024 08:37:24 -0700 Subject: [PATCH 1/2] skip submit window check for test validating #123 --- tests/testthat/_snaps/check_tbl_values_required.md | 2 +- tests/testthat/test-check_tbl_values_required.R | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/testthat/_snaps/check_tbl_values_required.md b/tests/testthat/_snaps/check_tbl_values_required.md index 3f0d2be4..a6927d7d 100644 --- a/tests/testthat/_snaps/check_tbl_values_required.md +++ b/tests/testthat/_snaps/check_tbl_values_required.md @@ -224,7 +224,7 @@ --- Code - check_for_errors(validate_submission(hub_path, file_path)) + check_for_errors(val) Message -- 2024-10-02-UMass-HMLR.parquet ---- diff --git a/tests/testthat/test-check_tbl_values_required.R b/tests/testthat/test-check_tbl_values_required.R index 0aba4c07..530d4d8c 100644 --- a/tests/testthat/test-check_tbl_values_required.R +++ b/tests/testthat/test-check_tbl_values_required.R @@ -276,8 +276,9 @@ test_that("(#123) check_tbl_values_required works with all optional output types c("24A", "24B") ) # Ensure that req_vals check is the only one that fails + val <- validate_submission(hub_path, file_path, skip_submit_window_check = TRUE) expect_snapshot( - check_for_errors(validate_submission(hub_path, file_path)), + check_for_errors(val), error = TRUE ) }) From 80d0f669267701487abfec8fcac68c2ba593559e Mon Sep 17 00:00:00 2001 From: Anna Krystalli Date: Thu, 10 Oct 2024 12:00:14 +0300 Subject: [PATCH 2/2] Revert to more verbose snapshot command --- tests/testthat/_snaps/check_tbl_values_required.md | 3 ++- tests/testthat/test-check_tbl_values_required.R | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/testthat/_snaps/check_tbl_values_required.md b/tests/testthat/_snaps/check_tbl_values_required.md index a6927d7d..4a3aa314 100644 --- a/tests/testthat/_snaps/check_tbl_values_required.md +++ b/tests/testthat/_snaps/check_tbl_values_required.md @@ -224,7 +224,8 @@ --- Code - check_for_errors(val) + check_for_errors(validate_submission(hub_path, file_path, + skip_submit_window_check = TRUE)) Message -- 2024-10-02-UMass-HMLR.parquet ---- diff --git a/tests/testthat/test-check_tbl_values_required.R b/tests/testthat/test-check_tbl_values_required.R index 530d4d8c..48aecad0 100644 --- a/tests/testthat/test-check_tbl_values_required.R +++ b/tests/testthat/test-check_tbl_values_required.R @@ -276,9 +276,11 @@ test_that("(#123) check_tbl_values_required works with all optional output types c("24A", "24B") ) # Ensure that req_vals check is the only one that fails - val <- validate_submission(hub_path, file_path, skip_submit_window_check = TRUE) expect_snapshot( - check_for_errors(val), + check_for_errors(validate_submission( + hub_path, file_path, + skip_submit_window_check = TRUE + )), error = TRUE ) })