pitrou commented on a change in pull request #7803:
URL: https://github.com/apache/arrow/pull/7803#discussion_r467858318
##########
File path: cpp/src/arrow/filesystem/s3fs_test.cc
##########
@@ -197,6 +197,32 @@ TEST(S3Options, FromUri) {
ASSERT_RAISES(Invalid, S3Options::FromUri("s3:///foo/bar/", &path));
}
+TEST(S3Options, FromAccessKey) {
+ S3Options options;
+
+ // session token is optional and should default to empty string
+ options = S3Options::FromAccessKey("access", "secret");
+ ASSERT_EQ(options.GetAccessKey(), "access");
+ ASSERT_EQ(options.GetSecretKey(), "secret");
+ ASSERT_EQ(options.GetSessionToken(), "");
+
+ options = S3Options::FromAccessKey("access", "secret", "token");
+ ASSERT_EQ(options.GetAccessKey(), "access");
+ ASSERT_EQ(options.GetSecretKey(), "secret");
+ ASSERT_EQ(options.GetSessionToken(), "token");
+}
+
+TEST(S3Options, FromAssumeRole) {
+ S3Options options;
+
+ // the only required argument should be role arn
+ options = S3Options::FromAssumeRole("my_role_arn");
Review comment:
This test seems to take a very long time on my local machine. Apparently
it's trying to make connections to `169.254.169.254` in a loop. Is there a way
to avoid that?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]