-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove InvalidChangeBatch customization (#1435)
- Loading branch information
Showing
7 changed files
with
82 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"id": "a9deee4f-8f15-472c-906f-492066275178", | ||
"type": "bugfix", | ||
"description": "Remove Route53 InvalidChangeBatch error response customization", | ||
"issues": [ | ||
"https://github.com/awslabs/aws-sdk-kotlin/issues/1433" | ||
] | ||
} |
42 changes: 0 additions & 42 deletions
42
.../kotlin/codegen/customization/route53/ChangeResourceRecordSetsUnmarshallingIntegration.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 0 additions & 40 deletions
40
...lin/codegen/customization/route53/ChangeResourceRecordSetsUnmarshallingIntegrationTest.kt
This file was deleted.
Oops, something went wrong.
49 changes: 0 additions & 49 deletions
49
...mon/src/aws/sdk/kotlin/services/route53/internal/ChangeResourceRecordSetsUnmarshalling.kt
This file was deleted.
Oops, something went wrong.
109 changes: 0 additions & 109 deletions
109
...est/aws/sdk/kotlin/services/route53/internal/ChangeResourceRecordSetsUnmarshallingTest.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
package aws.sdk.kotlin.services.route53 | ||
|
||
import aws.sdk.kotlin.services.route53.model.* | ||
import aws.smithy.kotlin.runtime.util.Uuid | ||
import kotlinx.coroutines.test.runTest | ||
import kotlin.test.Test | ||
import kotlin.test.assertFailsWith | ||
import kotlin.test.assertNotNull | ||
|
||
// https://github.com/awslabs/aws-sdk-kotlin/issues/1433 | ||
class InvalidChangeBatchTest { | ||
@Test | ||
fun testMessageIsPopulated() = runTest { | ||
Route53Client { | ||
region = "us-east-1" | ||
}.use { client -> | ||
val createHostedZoneResp = client.createHostedZone { | ||
this.callerReference = Uuid.random().toString() | ||
this.name = "this-is-a-test-hosted-zone-for-aws-sdk-kotlin.com" | ||
} | ||
|
||
val hostedZoneId = checkNotNull(createHostedZoneResp.hostedZone?.id) { "Hosted zone is unexpectedly null" } | ||
|
||
try { | ||
val exception = assertFailsWith<InvalidChangeBatch> { | ||
client.changeResourceRecordSets { | ||
this.hostedZoneId = hostedZoneId | ||
this.changeBatch = ChangeBatch { | ||
this.changes = listOf( | ||
Change { | ||
this.action = ChangeAction.Delete | ||
this.resourceRecordSet = ResourceRecordSet { | ||
this.name = "test.blerg.com" | ||
this.type = RrType.Cname | ||
this.ttl = 300 | ||
this.resourceRecords = listOf( | ||
ResourceRecord { | ||
value = "test.blerg.com" | ||
}, | ||
) | ||
} | ||
}, | ||
Change { | ||
this.action = ChangeAction.Create | ||
this.resourceRecordSet = ResourceRecordSet { | ||
this.name = "test.blerg.com" | ||
this.type = RrType.Cname | ||
this.ttl = 300 | ||
this.resourceRecords = listOf( | ||
ResourceRecord { | ||
value = "test.blerg.com" | ||
}, | ||
) | ||
} | ||
}, | ||
) | ||
this.comment = "testing..." | ||
} | ||
} | ||
} | ||
|
||
assertNotNull(exception.message) | ||
} finally { | ||
client.deleteHostedZone { | ||
id = hostedZoneId | ||
} | ||
} | ||
} | ||
} | ||
} |