emkornfield commented on a change in pull request #11375:
URL: https://github.com/apache/arrow/pull/11375#discussion_r725703839
##########
File path: cpp/src/arrow/filesystem/gcsfs_test.cc
##########
@@ -30,10 +34,58 @@ namespace arrow {
namespace fs {
namespace {
+namespace bp = boost::process;
+namespace gc = google::cloud;
+namespace gcs = google::cloud::storage;
+
using ::testing::IsEmpty;
using ::testing::Not;
using ::testing::NotNull;
+auto const* kPreexistingBucket = "test-bucket-name";
+
+class GcsIntegrationTest : public ::testing::Test {
+ public:
+ ~GcsIntegrationTest() override {
+ if (server_process_.valid()) {
+ // Brutal shutdown
+ server_process_.terminate();
+ server_process_.wait();
+ }
+ }
+
+ protected:
+ void SetUp() override {
+ port_ = std::to_string(GetListenPort());
+ auto exe_path = bp::search_path("python3");
+ ASSERT_THAT(exe_path, Not(IsEmpty()));
+
+ server_process_ = bp::child(boost::this_process::environment(), exe_path,
"-m",
+ "testbench", "--port", port_);
+
+ // Create a bucket in the testbench so additional
+ auto client = gcs::Client(
+ google::cloud::Options{}
+ .set<gcs::RestEndpointOption>("http://127.0.0.1:" + port_)
+ .set<gc::UnifiedCredentialsOption>(gc::MakeInsecureCredentials()));
+ auto metadata = client.CreateBucketForProject(
Review comment:
nit: maybe spell out type here (its not clear how bucket relates to
metadata)
--
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]