Skip to content

Commit 8beb9a0

Browse files
committed
migrate gcp tests
1 parent 52fe176 commit 8beb9a0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

targets.Rproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
Version: 1.0
2-
ProjectId: 45c326ed-3afb-44d4-9b50-07ada6a2e80e
32

43
RestoreWorkspace: Default
54
SaveWorkspace: Default

tests/gcp/test-class_gcp_file.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ tar_test("gcp_file format file gets stored", {
3131
expr <- tar_tidy_eval(expr, environment(), TRUE)
3232
eval(as.call(list(`tar_script`, expr, ask = FALSE)))
3333
tar_make(callr_function = NULL, envir = tar_option_get("envir"))
34+
unlink("example_gcp_file.txt")
35+
unlink("example_gcp_file.txt")
3436
expect_true(
3537
gcp_gcs_exists(
3638
bucket = bucket_name,
@@ -97,9 +99,11 @@ tar_test("gcp_file format invalidation", {
9799
expr <- tar_tidy_eval(expr, environment(), TRUE)
98100
eval(as.call(list(`tar_script`, expr, ask = FALSE)))
99101
tar_make(callr_function = NULL, envir = tar_option_get("envir"))
102+
unlink("example_gcp_file.txt")
100103
expect_equal(tar_progress(x)$progress, "completed")
101104
expect_equal(tar_progress(y)$progress, "completed")
102105
tar_make(callr_function = NULL)
106+
unlink("example_gcp_file.txt")
103107
progress <- tar_progress()
104108
progress <- progress[progress$progress != "skipped", ]
105109
expect_equal(nrow(progress), 0L)
@@ -129,6 +133,7 @@ tar_test("gcp_file format invalidation", {
129133
expr <- tar_tidy_eval(expr, environment(), TRUE)
130134
eval(as.call(list(`tar_script`, expr, ask = FALSE)))
131135
tar_make(callr_function = NULL, envir = tar_option_get("envir"))
136+
unlink("example_gcp_file.txt")
132137
expect_equal(tar_progress(x)$progress, "completed")
133138
expect_equal(tar_progress(y)$progress, "completed")
134139
expect_equal(tar_read(y), "x_lines2")
@@ -169,6 +174,7 @@ tar_test("gcp_file format with a custom data store", {
169174
expr <- tar_tidy_eval(expr, environment(), TRUE)
170175
eval(as.call(list(`tar_script`, expr, ask = FALSE)))
171176
tar_make(callr_function = NULL, envir = tar_option_get("envir"))
177+
unlink("example_gcp_file.txt")
172178
expect_true(file.exists("custom_targets_store"))
173179
expect_false(file.exists(path_store_default()))
174180
expect_true(

0 commit comments

Comments
 (0)