kou commented on code in PR #43601:
URL: https://github.com/apache/arrow/pull/43601#discussion_r1768132314
##########
cpp/src/arrow/filesystem/s3fs_test.cc:
##########
@@ -1579,5 +1616,26 @@ TEST(S3GlobalOptions, DefaultsLogLevel) {
}
}
+TEST(CalculateSSECustomerKeyMD5, Sanity) {
+ ASSERT_FALSE(CalculateSSECustomerKeyMD5("").ok()); // invalid length
+
ASSERT_FALSE(CalculateSSECustomerKeyMD5("1234567890123456789012345678901234567890")
+ .ok()); // invalid length
+ // valid case, with ascii input key
+ ASSERT_OK_AND_ASSIGN(auto md5,
+
CalculateSSECustomerKeyMD5("NLbTMHZn9aCW3Li3ViAdBsoIldPCREw1"))
+ ASSERT_STREQ(md5.c_str(),
+ "7B3ilqBA6/PYeo5z9+a3OQ=="); // valid case
Review Comment:
```suggestion
ASSERT_EQ(md5, "7B3ilqBA6/PYeo5z9+a3OQ=="); // valid case
```
--
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]