| 532 | } |
| 533 | |
| 534 | Status PopulateTestBucket() { |
| 535 | Aws::S3::Model::PutObjectRequest req; |
| 536 | req.SetBucket(ToAwsString("bucket")); |
| 537 | req.SetKey(ToAwsString("emptydir/")); |
| 538 | RETURN_NOT_OK(OutcomeToStatus("PutObject", client_->PutObject(req))); |
| 539 | // NOTE: no need to create intermediate "directories" somedir/ and |
| 540 | // somedir/subdir/ |
| 541 | req.SetKey(ToAwsString("somedir/subdir/subfile")); |
| 542 | req.SetBody(std::make_shared<std::stringstream>("sub data")); |
| 543 | RETURN_NOT_OK(OutcomeToStatus("PutObject", client_->PutObject(req))); |
| 544 | req.SetKey(ToAwsString("somefile")); |
| 545 | req.SetBody(std::make_shared<std::stringstream>("some data")); |
| 546 | req.SetContentType("x-arrow/test"); |
| 547 | RETURN_NOT_OK(OutcomeToStatus("PutObject", client_->PutObject(req))); |
| 548 | req.SetKey(ToAwsString("otherdir/1/2/3/otherfile")); |
| 549 | req.SetBody(std::make_shared<std::stringstream>("other data")); |
| 550 | RETURN_NOT_OK(OutcomeToStatus("PutObject", client_->PutObject(req))); |
| 551 | |
| 552 | return Status::OK(); |
| 553 | } |
| 554 | |
| 555 | Status RestoreTestBucket() { |
| 556 | // First empty the test bucket, and then re-upload initial test files. |
nothing calls this directly
no test coverage detected