| 68 | auto* lib_env = ::testing::AddGlobalTestEnvironment(new RegistrationTestEnvironment); |
| 69 | |
| 70 | TEST(S3Test, FromUri) { |
| 71 | ASSERT_OK_AND_ASSIGN(auto minio, GetMinioEnv()->GetOneServer()); |
| 72 | |
| 73 | std::string path; |
| 74 | ASSERT_OK_AND_ASSIGN(auto fs, FileSystemFromUri("s3://" + minio->access_key() + ":" + |
| 75 | minio->secret_key() + |
| 76 | "@bucket/somedir/subdir/subfile", |
| 77 | &path)); |
| 78 | |
| 79 | EXPECT_EQ(fs->MakeUri("/" + path), |
| 80 | "s3://minio:miniopass@bucket/somedir/subdir/subfile" |
| 81 | "?region=us-east-1&scheme=https&endpoint_override=" |
| 82 | "&allow_bucket_creation=0&allow_bucket_deletion=0"); |
| 83 | } |
| 84 | |
| 85 | } // namespace arrow::fs |