kou commented on code in PR #43601:
URL: https://github.com/apache/arrow/pull/43601#discussion_r1768133579
##########
cpp/src/arrow/filesystem/s3fs_test.cc:
##########
@@ -1288,6 +1291,40 @@ TEST_F(TestS3FS, OpenInputFile) {
ASSERT_RAISES(IOError, file->Seek(10));
}
+TEST_F(TestS3FS, SSECustomerKeyMatch) {
+ // normal write/read with correct SSEC key
+ std::shared_ptr<io::OutputStream> stream;
+ options_.sse_customer_key = "12345678123456781234567812345678";
+ MakeFileSystem(true); // need to use https, otherwise get 'InvalidRequest
Message:
+ // Requests specifying Server Side Encryption with
Customer
+ // provided keys must be made over a secure
connection.'
+ ASSERT_OK_AND_ASSIGN(stream,
fs_->OpenOutputStream("bucket/newfile_with_sse_c"));
+ ASSERT_OK(stream->Write("some"));
+ ASSERT_OK(stream->Close());
+ std::shared_ptr<io::RandomAccessFile> file;
+ std::shared_ptr<Buffer> buf;
+ ASSERT_OK_AND_ASSIGN(file, fs_->OpenInputFile("bucket/newfile_with_sse_c"));
+ ASSERT_OK_AND_ASSIGN(buf, file->Read(4));
Review Comment:
```suggestion
ASSERT_OK_AND_ASSIGN(auto file,
fs_->OpenInputFile("bucket/newfile_with_sse_c"));
ASSERT_OK_AND_ASSIGN(auto buf, file->Read(4));
```
--
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]