Skip to content

Commit

Permalink
Fix #1373
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau-lilly committed Nov 11, 2024
1 parent 755c879 commit 9e02e14
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 25 deletions.
4 changes: 2 additions & 2 deletions tests/aws/test-aws_endpoint.R
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
Expand Down Expand Up @@ -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)
Expand Down
24 changes: 12 additions & 12 deletions tests/aws/test-class_aws_qs.R
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand Down
18 changes: 9 additions & 9 deletions tests/gcp/test-class_gcp_qs.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 4 additions & 2 deletions tests/testthat/test-class_resources_qs.R
Original file line number Diff line number Diff line change
Expand Up @@ -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", {
Expand Down

0 comments on commit 9e02e14

Please sign in to comment.