Skip to content

Commit

Permalink
Same with gcp inventories
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau-lilly committed Nov 13, 2023
1 parent 87fd352 commit 3622688
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/gcp/test-class_inventory_gcp.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ tar_test("inventory_gcp class", {
)
store <- store_init(repository = "gcp", resources = resources)
expect_equal(inventory$list_cache(), character(0L))
expect_null(inventory$misses)
expect_equal(inventory$downloads, 0L)
expect_equal(inventory$misses, 0L)
for (key in rev(file.path(prefix, c("w", "x", "y", "z")))) {
store$file$path <- store_produce_gcp_path(
store = store,
Expand All @@ -34,6 +35,7 @@ tar_test("inventory_gcp class", {
)
out <- inventory$get_cache(store)
expect_equal(inventory$misses, 1L)
expect_equal(inventory$downloads, 1L)
expect_equal(out, digest_chr64(head[[key]]$md5))
expect_equal(
sort(inventory$list_cache()),
Expand All @@ -46,4 +48,12 @@ tar_test("inventory_gcp class", {
)
)
}
store$file$path <- store_produce_gcp_path(
store = store,
name = "nope",
path_store = path_store_default()
)
expect_null(inventory$get_cache(store))
expect_equal(inventory$downloads, 1L)
expect_equal(inventory$misses, 2L)
})

0 comments on commit 3622688

Please sign in to comment.