Once the GCS filesystem implementation is functionally complete, generic tests should be enabled for it to catch corner cases. See for example the S3 filesystem tests:
| classTestS3FSGeneric : publicS3TestMixin, publicGenericFileSystemTest { |
| public: |
| voidSetUp() override { |
| S3TestMixin::SetUp(); |
| // Set up test bucket |
| { |
| Aws::S3::Model::CreateBucketRequest req; |
| req.SetBucket(ToAwsString("s3fs-test-bucket")); |
| ASSERT_OK(OutcomeToStatus(client_->CreateBucket(req))); |
| } |
| |
| options_.ConfigureAccessKey(minio_.access_key(), minio_.secret_key()); |
| options_.scheme = "http"; |
| options_.endpoint_override = minio_.connect_string(); |
| ASSERT_OK_AND_ASSIGN(s3fs_, S3FileSystem::Make(options_)); |
| fs_ = std::make_shared<SubTreeFileSystem>("s3fs-test-bucket", s3fs_); |
| } |
| |
| protected: |
| std::shared_ptr<FileSystem> GetEmptyFileSystem() override { return fs_; } |
| |
| boolhave_implicit_directories() constoverride { returntrue; } |
| boolallow_write_file_over_dir() constoverride { returntrue; } |
| boolallow_move_dir() constoverride { returnfalse; } |
| boolallow_append_to_file() constoverride { returnfalse; } |
| boolhave_directory_mtimes() constoverride { returnfalse; } |
| boolhave_flaky_directory_tree_deletion() constoverride { |
| #ifdef _WIN32 |
| // Recent Minio versions on Windows may not register deletion of all |
| // directories in a tree when doing a bulk delete. |
| returntrue; |
| #else |
| returnfalse; |
| #endif |
| } |
| boolhave_file_metadata() constoverride { returntrue; } |
| |
| S3Options options_; |
| std::shared_ptr<S3FileSystem> s3fs_; |
| std::shared_ptr<FileSystem> fs_; |
| }; |
| |
| GENERIC_FS_TEST_FUNCTIONS(TestS3FSGeneric); |
Reporter: Antoine Pitrou / @pitrou
Assignee: Carlos O'Ryan / @coryan
Related issues:
PRs and other links:
Note: This issue was originally created as ARROW-14924. Please see the migration documentation for further details.
Once the GCS filesystem implementation is functionally complete, generic tests should be enabled for it to catch corner cases. See for example the S3 filesystem tests:
arrow/cpp/src/arrow/filesystem/s3fs_test.cc
Lines 1039 to 1081 in 3e666f6
Reporter: Antoine Pitrou / @pitrou
Assignee: Carlos O'Ryan / @coryan
Related issues:
PRs and other links:
Note: This issue was originally created as ARROW-14924. Please see the migration documentation for further details.