From 9e02e143e180866ee255a059fb7a049a37b144ee Mon Sep 17 00:00:00 2001 From: wlandau-lilly Date: Mon, 11 Nov 2024 13:54:56 -0500 Subject: [PATCH] Fix #1373 --- tests/aws/test-aws_endpoint.R | 4 ++-- tests/aws/test-class_aws_qs.R | 24 ++++++++++++------------ tests/gcp/test-class_gcp_qs.R | 18 +++++++++--------- tests/testthat/test-class_resources_qs.R | 6 ++++-- 4 files changed, 27 insertions(+), 25 deletions(-) diff --git a/tests/aws/test-aws_endpoint.R b/tests/aws/test-aws_endpoint.R index 4394f388..edf15f54 100644 --- a/tests/aws/test-aws_endpoint.R +++ b/tests/aws/test-aws_endpoint.R @@ -16,7 +16,7 @@ client <- function() { tar_test("aws qs format data gets stored", { skip_if_no_aws() skip_if_no_gcp() - skip_if_not_installed("qs") + skip_if_not_installed("qs2") s3 <- client() bucket_name <- random_bucket_name() on.exit(aws_s3_delete_bucket(bucket_name, client())) @@ -74,7 +74,7 @@ tar_test("aws qs format data gets stored", { tar_test("aws qs format invalidation", { skip_if_no_aws() skip_if_no_gcp() - skip_if_not_installed("qs") + skip_if_not_installed("qs2") s3 <- client() bucket_name <- random_bucket_name() s3$create_bucket(Bucket = bucket_name) diff --git a/tests/aws/test-class_aws_qs.R b/tests/aws/test-class_aws_qs.R index 5717fc2f..86c16db3 100644 --- a/tests/aws/test-class_aws_qs.R +++ b/tests/aws/test-class_aws_qs.R @@ -2,7 +2,7 @@ # And afterwards, manually verify that all the buckets are gone. tar_test("aws_qs format data gets stored", { skip_if_no_aws() - skip_if_not_installed("qs") + skip_if_not_installed("qs2") s3 <- paws.storage::s3() bucket_name <- random_bucket_name() on.exit(aws_s3_delete_bucket(bucket_name)) @@ -51,7 +51,7 @@ tar_test("aws_qs format data gets stored", { tar_test("aws_qs format data gets stored with worker storage", { skip_if_no_aws() - skip_if_not_installed("qs") + skip_if_not_installed("qs2") s3 <- paws.storage::s3() bucket_name <- random_bucket_name() s3$create_bucket(Bucket = bucket_name) @@ -102,7 +102,7 @@ tar_test("aws_qs format data gets stored with worker storage", { tar_test("aws_qs format invalidation", { skip_if_no_aws() - skip_if_not_installed("qs") + skip_if_not_installed("qs2") s3 <- paws.storage::s3() bucket_name <- random_bucket_name() s3$create_bucket(Bucket = bucket_name) @@ -149,7 +149,7 @@ tar_test("aws_qs format invalidation", { tar_test("aws_qs format and dynamic branching", { skip_if_no_aws() - skip_if_not_installed("qs") + skip_if_not_installed("qs2") s3 <- paws.storage::s3() bucket_name <- random_bucket_name() s3$create_bucket(Bucket = bucket_name) @@ -181,7 +181,7 @@ tar_test("aws_qs format and dynamic branching", { tar_test("aws timestamp", { skip_if_no_aws() - skip_if_not_installed("qs") + skip_if_not_installed("qs2") s3 <- paws.storage::s3() bucket_name <- random_bucket_name() s3$create_bucket(Bucket = bucket_name) @@ -211,7 +211,7 @@ tar_test("aws timestamp", { tar_test("aws_qs format with an alternative data store", { skip_if_no_aws() - skip_if_not_installed("qs") + skip_if_not_installed("qs2") tar_config_set(store = "custom_targets_store") s3 <- paws.storage::s3() bucket_name <- random_bucket_name() @@ -261,7 +261,7 @@ tar_test("aws_qs format with an alternative data store", { tar_test("aws_qs format works with storage = \"none\"", { skip_if_no_aws() - skip_if_not_installed("qs") + skip_if_not_installed("qs2") s3 <- paws.storage::s3() bucket_name <- random_bucket_name() s3$create_bucket(Bucket = bucket_name) @@ -316,7 +316,7 @@ tar_test("aws_qs format works with storage = \"none\"", { tar_test("aws_qs format with custom region", { skip_if_no_aws() - skip_if_not_installed("qs") + skip_if_not_installed("qs2") s3 <- paws.storage::s3() bucket_name <- random_bucket_name() region <- region <- ifelse( @@ -393,7 +393,7 @@ tar_test("aws_qs format with custom region", { tar_test("aws_qs format empty region string", { skip_if_no_aws() - skip_if_not_installed("qs") + skip_if_not_installed("qs2") s3 <- paws.storage::s3() bucket_name <- random_bucket_name() s3$create_bucket(Bucket = bucket_name) @@ -421,7 +421,7 @@ tar_test("aws_qs format empty region string", { tar_test("aws_qs nonexistent bucket", { skip_if_no_aws() - skip_if_not_installed("qs") + skip_if_not_installed("qs2") s3 <- paws.storage::s3() bucket_name <- random_bucket_name() s3$create_bucket(Bucket = bucket_name) @@ -457,7 +457,7 @@ tar_test("aws_qs nonexistent bucket", { tar_test("aws_qs format versioning", { # setup skip_if_no_aws() - skip_if_not_installed("qs") + skip_if_not_installed("qs2") s3 <- paws.storage::s3() bucket_name <- random_bucket_name() on.exit(aws_s3_delete_bucket(bucket_name)) @@ -544,7 +544,7 @@ tar_test("aws_qs format versioning", { tar_test("cloud target paths are not in the file path cache", { skip_if_no_aws() - skip_if_not_installed("qs") + skip_if_not_installed("qs2") s3 <- paws.storage::s3() bucket_name <- random_bucket_name() on.exit(aws_s3_delete_bucket(bucket_name)) diff --git a/tests/gcp/test-class_gcp_qs.R b/tests/gcp/test-class_gcp_qs.R index cac63fe0..b05cb2f4 100644 --- a/tests/gcp/test-class_gcp_qs.R +++ b/tests/gcp/test-class_gcp_qs.R @@ -2,7 +2,7 @@ # Verify all `targets` buckets are deleted afterwards. tar_test("gcp_qs format data gets stored", { skip_if_no_gcp() - skip_if_not_installed("qs") + skip_if_not_installed("qs2") bucket_name <- random_bucket_name() # needs to be a GCP project the tester auth has access to gcp_gcs_auth(max_tries = 5L) @@ -53,7 +53,7 @@ tar_test("gcp_qs format data gets stored", { tar_test("gcp_qs format data gets stored with worker storage", { skip_if_no_gcp() - skip_if_not_installed("qs") + skip_if_not_installed("qs2") bucket_name <- random_bucket_name() # needs to be a GCP project the tester auth has access to gcp_gcs_auth(max_tries = 5L) @@ -106,7 +106,7 @@ tar_test("gcp_qs format data gets stored with worker storage", { tar_test("gcp_qs format invalidation", { skip_if_no_gcp() - skip_if_not_installed("qs") + skip_if_not_installed("qs2") bucket_name <- random_bucket_name() # needs to be a GCP project the tester auth has access to gcp_gcs_auth(max_tries = 5L) @@ -155,7 +155,7 @@ tar_test("gcp_qs format invalidation", { tar_test("gcp_qs format and dynamic branching", { skip_if_no_gcp() - skip_if_not_installed("qs") + skip_if_not_installed("qs2") bucket_name <- random_bucket_name() # needs to be a GCP project the tester auth has access to gcp_gcs_auth(max_tries = 5L) @@ -189,7 +189,7 @@ tar_test("gcp_qs format and dynamic branching", { tar_test("gcp timestamp", { skip_if_no_gcp() - skip_if_not_installed("qs") + skip_if_not_installed("qs2") bucket_name <- random_bucket_name() # needs to be a GCP project the tester auth has access to gcp_gcs_auth(max_tries = 5L) @@ -221,7 +221,7 @@ tar_test("gcp timestamp", { tar_test("gcp_qs format with an alternative data store", { skip_if_no_gcp() - skip_if_not_installed("qs") + skip_if_not_installed("qs2") tar_config_set(store = "custom_targets_store") bucket_name <- random_bucket_name() # needs to be a GCP project the tester auth has access to @@ -273,7 +273,7 @@ tar_test("gcp_qs format with an alternative data store", { tar_test("gcp_qs format works with storage = \"none\"", { skip_if_no_gcp() - skip_if_not_installed("qs") + skip_if_not_installed("qs2") bucket_name <- random_bucket_name() # needs to be a GCP project the tester auth has access to gcp_gcs_auth(max_tries = 5L) @@ -330,7 +330,7 @@ tar_test("gcp_qs format works with storage = \"none\"", { tar_test("gcp_qs nonexistent bucket", { skip_if_no_gcp() - skip_if_not_installed("qs") + skip_if_not_installed("qs2") bucket_name <- random_bucket_name() # needs to be a GCP project the tester auth has access to gcp_gcs_auth(max_tries = 5L) @@ -364,7 +364,7 @@ tar_test("gcp_qs nonexistent bucket", { tar_test("gcp_qs format versioning", { # setup skip_if_no_gcp() - skip_if_not_installed("qs") + skip_if_not_installed("qs2") bucket_name <- random_bucket_name() # needs to be a GCP project the tester auth has access to gcp_gcs_auth(max_tries = 5L) diff --git a/tests/testthat/test-class_resources_qs.R b/tests/testthat/test-class_resources_qs.R index e5809334..1768d95f 100644 --- a/tests/testthat/test-class_resources_qs.R +++ b/tests/testthat/test-class_resources_qs.R @@ -4,8 +4,10 @@ tar_test("create tar_resources_qs object", { }) tar_test("prohibit empty tar_resources_qs object", { - x <- resources_qs_init(compress_level = NULL) - expect_error(resources_validate(x), class = "tar_condition_validate") + expect_error( + resources_qs_init(compress_level = NULL), + class = "tar_condition_validate" + ) }) tar_test("print tar_resources_qs object", {