-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Milestone
Description
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
| class TestS3FSGeneric : public S3TestMixin, public GenericFileSystemTest { | |
| public: | |
| void SetUp() 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_; } | |
| bool have_implicit_directories() const override { return true; } | |
| bool allow_write_file_over_dir() const override { return true; } | |
| bool allow_move_dir() const override { return false; } | |
| bool allow_append_to_file() const override { return false; } | |
| bool have_directory_mtimes() const override { return false; } | |
| bool have_flaky_directory_tree_deletion() const override { | |
| #ifdef _WIN32 | |
| // Recent Minio versions on Windows may not register deletion of all | |
| // directories in a tree when doing a bulk delete. | |
| return true; | |
| #else | |
| return false; | |
| #endif | |
| } | |
| bool have_file_metadata() const override { return true; } | |
| 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:
- [C++] GcsFileSystem should use metadata to distinguish directory markers (is a parent of)
- [C++] GcsFileSystem *File classes fail to report errors (is a parent of)
- [C++] Some filesystems may allow reading directories (is a parent of)
- [C++] Add filesystem / IO implementation for Google Cloud Storage (is a child of)
PRs and other links:
Note: This issue was originally created as ARROW-14924. Please see the migration documentation for further details.