MCPcopy Create free account
hub / github.com/apache/arrow / TEST_F

Function TEST_F

cpp/src/arrow/filesystem/s3fs_test.cc:284–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

282class InternalsTest : public AwsTestMixin {};
283
284TEST_F(InternalsTest, CalculateSSECustomerKeyMD5) {
285 ASSERT_RAISES(Invalid, CalculateSSECustomerKeyMD5("")); // invalid length
286 ASSERT_RAISES(Invalid,
287 CalculateSSECustomerKeyMD5(
288 "1234567890123456789012345678901234567890")); // invalid length
289 // valid case, with some non-ASCII character and a null byte in the sse_customer_key
290 char sse_customer_key[32] = {};
291 sse_customer_key[0] = '\x40'; // '@' character
292 sse_customer_key[1] = '\0'; // null byte
293 sse_customer_key[2] = '\xFF'; // non-ASCII
294 sse_customer_key[31] = '\xFA'; // non-ASCII
295 std::string sse_customer_key_string(sse_customer_key, sizeof(sse_customer_key));
296 ASSERT_OK_AND_ASSIGN(auto md5, CalculateSSECustomerKeyMD5(sse_customer_key_string))
297 ASSERT_EQ(md5, "97FTa6lj0hE7lshKdBy61g=="); // valid case
298}
299
300////////////////////////////////////////////////////////////////////////////
301// S3Options tests

Callers

nothing calls this directly

Calls 15

RaisesFunction · 0.85
STSClientClass · 0.85
ResolveS3BucketRegionFunction · 0.85
ToAwsStringFunction · 0.85
OutcomeToStatusFunction · 0.85
AssertFileInfoFunction · 0.85
SortInfosFunction · 0.85
CollectFileInfoGeneratorFunction · 0.85
ToCharsFunction · 0.85
AllFinishedFunction · 0.85

Tested by

no test coverage detected