ripplehang commented on code in PR #43601:
URL: https://github.com/apache/arrow/pull/43601#discussion_r1778367486
##########
cpp/src/arrow/filesystem/s3_test_util.cc:
##########
@@ -91,9 +121,21 @@ Status MinioTestServer::Start() {
impl_->connect_string_ = GenerateConnectString();
ARROW_RETURN_NOT_OK(impl_->server_process_->SetExecutable(kMinioExecutableName));
// NOTE: --quiet makes startup faster by suppressing remote version check
- impl_->server_process_->SetArgs({"server", "--quiet", "--compat",
"--address",
- impl_->connect_string_,
- impl_->temp_dir_->path().ToString()});
+ std::vector<std::string> start_args = {"server", "--quiet", "--compat",
"--address",
+ impl_->connect_string_};
+
+ // create the dedicated folder for certificate file, rather than reuse the
data
+ // folder, since there is test case to check whether the folder is empty.
+ ARROW_ASSIGN_OR_RAISE(impl_->temp_dir_ca_,
TemporaryDir::Make("s3fs-test-ca-"));
+ GenerateCertificateFile();
+ start_args.push_back("--certs-dir");
+ start_args.push_back(ca_path());
+ arrow::fs::FileSystemGlobalOptions global_options;
+ global_options.tls_ca_dir_path = ca_path();
+ ARROW_RETURN_NOT_OK(arrow::fs::Initialize(global_options));
+ // apply the data path at the end since some minio version only support it
at the end
+ start_args.push_back(impl_->temp_dir_->path().ToString());
+ impl_->server_process_->SetArgs(start_args);
Review Comment:
ok, I would refine here., the previous implement was caused by handling with
the tls flag, since we decided to use tls for all the cases, we could refine
here.
--
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]