File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
tests/aws-cpp-sdk-transfer-unit-tests Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -21,10 +21,14 @@ class MockS3Client : public S3Client {
2121public:
2222 MockS3Client () : S3Client(){};
2323
24- GetObjectOutcome GetObject (const GetObjectRequest&) const override {
24+ GetObjectOutcome GetObject (const GetObjectRequest& request ) const override {
2525 GetObjectResult result;
26- // Return wrong range to trigger validation failure
27- result.SetContentRange (" bytes 1024-2047/2048" );
26+
27+ if (request.RangeHasBeenSet ()) {
28+ // Always return mismatched range to trigger validation failure
29+ result.SetContentRange (" bytes 1024-2047/2048" );
30+ }
31+
2832 auto stream = Aws::New<std::stringstream>(ALLOCATION_TAG);
2933 *stream << " mock data" ;
3034 result.ReplaceBody (stream);
You can’t perform that action at this time.
0 commit comments