diff --git a/tests/gcp/test-class_inventory_gcp.R b/tests/gcp/test-class_inventory_gcp.R index c753cc71..76112c5e 100644 --- a/tests/gcp/test-class_inventory_gcp.R +++ b/tests/gcp/test-class_inventory_gcp.R @@ -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, @@ -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()), @@ -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) })