Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
plietar committed Oct 24, 2024
1 parent 45049b1 commit 537bac3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/testthat/test-location.R
Original file line number Diff line number Diff line change
Expand Up @@ -1074,8 +1074,6 @@ test_that("skip files in the file store", {


test_that("skip files known elsewhere on disk", {
withr::local_options(orderly.quiet = FALSE)

root <- list()
for (name in c("src", "dst")) {
root[[name]] <- create_temporary_root(use_file_store = FALSE)
Expand All @@ -1086,11 +1084,13 @@ test_that("skip files known elsewhere on disk", {
orderly_location_pull_metadata(root = root$dst)
suppressMessages(orderly_location_pull_packet(id[[1]], root = root$dst))

res <- testthat::evaluate_promise(
orderly_location_pull_packet(id[[2]], root = root$dst))
expect_match(res$messages, "Found 1 file on disk", all = FALSE)
expect_match(res$messages, "Need to fetch 2 files.+from 1 location",
all = FALSE)
withr::with_options(list(orderly.quiet = FALSE), {
res <- testthat::evaluate_promise(
orderly_location_pull_packet(id[[2]], root = root$dst))
expect_match(res$messages, "Found 1 file on disk", all = FALSE)
expect_match(res$messages, "Need to fetch 2 files.+from 1 location",
all = FALSE)
})
})


Expand Down

0 comments on commit 537bac3

Please sign in to comment.