Skip to content

Commit 7f5f09b

Browse files
authored
fix: remove InvalidChangeBatch customization (#1435)
1 parent 650f7b2 commit 7f5f09b

File tree

7 files changed

+82
-241
lines changed

7 files changed

+82
-241
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"id": "a9deee4f-8f15-472c-906f-492066275178",
3+
"type": "bugfix",
4+
"description": "Remove Route53 InvalidChangeBatch error response customization",
5+
"issues": [
6+
"https://github.com/awslabs/aws-sdk-kotlin/issues/1433"
7+
]
8+
}

codegen/aws-sdk-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/customization/route53/ChangeResourceRecordSetsUnmarshallingIntegration.kt

Lines changed: 0 additions & 42 deletions
This file was deleted.

codegen/aws-sdk-codegen/src/main/resources/META-INF/services/software.amazon.smithy.kotlin.codegen.integration.KotlinIntegration

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ aws.sdk.kotlin.codegen.customization.glacier.GlacierBodyChecksum
3333
aws.sdk.kotlin.codegen.customization.polly.PollyPresigner
3434
aws.sdk.kotlin.codegen.customization.machinelearning.MachineLearningEndpointCustomization
3535
aws.sdk.kotlin.codegen.customization.route53.TrimResourcePrefix
36-
aws.sdk.kotlin.codegen.customization.route53.ChangeResourceRecordSetsUnmarshallingIntegration
3736
aws.sdk.kotlin.codegen.customization.ec2.EC2MakePrimitivesOptional
3837
aws.sdk.kotlin.codegen.customization.RemoveDefaults
3938
aws.sdk.kotlin.codegen.customization.s3.UnsupportedSigningAlgorithmIntegration

codegen/aws-sdk-codegen/src/test/kotlin/aws/sdk/kotlin/codegen/customization/route53/ChangeResourceRecordSetsUnmarshallingIntegrationTest.kt

Lines changed: 0 additions & 40 deletions
This file was deleted.

services/route53/common/src/aws/sdk/kotlin/services/route53/internal/ChangeResourceRecordSetsUnmarshalling.kt

Lines changed: 0 additions & 49 deletions
This file was deleted.

services/route53/common/test/aws/sdk/kotlin/services/route53/internal/ChangeResourceRecordSetsUnmarshallingTest.kt

Lines changed: 0 additions & 109 deletions
This file was deleted.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
package aws.sdk.kotlin.services.route53
6+
7+
import aws.sdk.kotlin.services.route53.model.*
8+
import aws.smithy.kotlin.runtime.util.Uuid
9+
import kotlinx.coroutines.test.runTest
10+
import kotlin.test.Test
11+
import kotlin.test.assertFailsWith
12+
import kotlin.test.assertNotNull
13+
14+
// https://github.com/awslabs/aws-sdk-kotlin/issues/1433
15+
class InvalidChangeBatchTest {
16+
@Test
17+
fun testMessageIsPopulated() = runTest {
18+
Route53Client {
19+
region = "us-east-1"
20+
}.use { client ->
21+
val createHostedZoneResp = client.createHostedZone {
22+
this.callerReference = Uuid.random().toString()
23+
this.name = "this-is-a-test-hosted-zone-for-aws-sdk-kotlin.com"
24+
}
25+
26+
val hostedZoneId = checkNotNull(createHostedZoneResp.hostedZone?.id) { "Hosted zone is unexpectedly null" }
27+
28+
try {
29+
val exception = assertFailsWith<InvalidChangeBatch> {
30+
client.changeResourceRecordSets {
31+
this.hostedZoneId = hostedZoneId
32+
this.changeBatch = ChangeBatch {
33+
this.changes = listOf(
34+
Change {
35+
this.action = ChangeAction.Delete
36+
this.resourceRecordSet = ResourceRecordSet {
37+
this.name = "test.blerg.com"
38+
this.type = RrType.Cname
39+
this.ttl = 300
40+
this.resourceRecords = listOf(
41+
ResourceRecord {
42+
value = "test.blerg.com"
43+
},
44+
)
45+
}
46+
},
47+
Change {
48+
this.action = ChangeAction.Create
49+
this.resourceRecordSet = ResourceRecordSet {
50+
this.name = "test.blerg.com"
51+
this.type = RrType.Cname
52+
this.ttl = 300
53+
this.resourceRecords = listOf(
54+
ResourceRecord {
55+
value = "test.blerg.com"
56+
},
57+
)
58+
}
59+
},
60+
)
61+
this.comment = "testing..."
62+
}
63+
}
64+
}
65+
66+
assertNotNull(exception.message)
67+
} finally {
68+
client.deleteHostedZone {
69+
id = hostedZoneId
70+
}
71+
}
72+
}
73+
}
74+
}

0 commit comments

Comments
 (0)