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

Function TEST_F

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 15

STSClientClass · 0.85
ResolveS3BucketRegionFunction · 0.85
SortInfosFunction · 0.85
AssertFileInfoFunction · 0.85
CollectFileInfoGeneratorFunction · 0.85
ToCharsFunction · 0.85
GetCpuThreadPoolFunction · 0.85
ZipClass · 0.85
CollectAsyncGeneratorFunction · 0.85
MakeFileSystemFunction · 0.85
AssertObjectContentsFunction · 0.85

Tested by

no test coverage detected