Skip to content

Commit 3156c89

Browse files
authored
test(s3): add sanity test to catch regressions in size shape (#375)
1 parent 5521114 commit 3156c89

File tree

1 file changed

+22
-0
lines changed
  • services/s3/common/test/aws/sdk/kotlin/services/s3/model

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0.
4+
*/
5+
6+
package aws.sdk.kotlin.services.s3.model
7+
8+
import kotlin.test.Test
9+
import kotlin.test.assertIs
10+
11+
class TestS3Size {
12+
@Test
13+
fun testSizeIsLong() {
14+
// verify no regressions in `Size` shape reverting to `Integer` (it should be `Long`)
15+
// see: https://github.com/awslabs/aws-sdk-kotlin/issues/309
16+
17+
val obj = Object { size = 100 }
18+
val req = PutObjectRequest { contentLength = 100 }
19+
assertIs<Long>(obj.size)
20+
assertIs<Long>(req.contentLength)
21+
}
22+
}

0 commit comments

Comments
 (0)