thisisnic commented on code in PR #13206:
URL: https://github.com/apache/arrow/pull/13206#discussion_r890299274


##########
r/tests/testthat/test-s3-minio.R:
##########
@@ -180,6 +190,20 @@ if (arrow_with_s3() && process_is_running("minio server")) 
{
       expect_length(fs$ls(minio_path("new_dataset_dir")), 1)
     })
 
+    test_that("CreateDir fails on bucket if allow_bucket_creation=False", {
+      now_tmp <- paste0(now, "-test-fail-delete")
+      fs$CreateDir(now_tmp)
+
+      expect_error(
+        limited_fs$CreateDir("should-fail"),
+        regexp = "Bucket does not exist"
+      )
+      expect_error(
+        limited_fs$DeleteDir(now_tmp),
+        regexp = "Would delete bucket"
+      )
+    })

Review Comment:
   I wonder if these tests might be better without the `regexp` parameter, 
given that the specific phrasing of them comes from the C++ layer, and we tend 
to avoid testing that component of the error message?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to