File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ class S3PresignerTest {
5050 withAllEngines { engine ->
5151 val httpClient = SdkHttpClient (engine)
5252
53+ // PUT
5354 val unsignedPutRequest = PutObjectRequest {
5455 bucket = testBucket
5556 key = keyName
@@ -58,6 +59,7 @@ class S3PresignerTest {
5859
5960 S3TestUtils .responseCodeFromPut(presignedPutRequest, contents)
6061
62+ // GET
6163 val unsignedGetRequest = GetObjectRequest {
6264 bucket = testBucket
6365 key = keyName
@@ -69,6 +71,17 @@ class S3PresignerTest {
6971 call.complete()
7072 assertEquals(200 , call.response.status.value)
7173 assertEquals(contents, body)
74+
75+ // DELETE
76+ val unsignedDeleteRequest = DeleteObjectRequest {
77+ bucket = testBucket
78+ key = keyName
79+ }
80+ val presignedDeleteObject = client.presignDeleteObject(unsignedDeleteRequest, 60 .seconds)
81+
82+ val call = httpClient.call(presignedDeleteObject)
83+ call.complete()
84+ assertEquals(204 , call.response.status.value)
7285 }
7386 }
7487
You can’t perform that action at this time.
0 commit comments