Skip to content

Commit c7379e8

Browse files
authored
fix: Generate CBOR smoke tests as AWS services (#928)
1 parent 1dfc8d0 commit c7379e8

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

smithy-swift-codegen/src/main/kotlin/software/amazon/smithy/swift/codegen/integration/DefaultHTTPProtocolCustomizations.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,6 @@ abstract class DefaultHTTPProtocolCustomizations : HTTPProtocolCustomizable {
4747
override val unknownServiceErrorSymbol: Symbol = ClientRuntimeTypes.Http.UnknownHttpServiceError
4848

4949
override val defaultTimestampFormat = TimestampFormatTrait.Format.EPOCH_SECONDS
50+
51+
override fun smokeTestGenerator(ctx: ProtocolGenerator.GenerationContext): SmokeTestGenerator = SmokeTestGenerator(ctx)
5052
}

smithy-swift-codegen/src/main/kotlin/software/amazon/smithy/swift/codegen/integration/HTTPBindingProtocolGenerator.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ abstract class HTTPBindingProtocolGenerator(
406406
}
407407
}
408408

409-
override fun generateSmokeTests(ctx: ProtocolGenerator.GenerationContext) = SmokeTestGenerator(ctx).generateSmokeTests()
409+
override fun generateSmokeTests(ctx: ProtocolGenerator.GenerationContext) = customizations.smokeTestGenerator(ctx).generateSmokeTests()
410410

411411
override fun initializeMiddleware(ctx: ProtocolGenerator.GenerationContext) {
412412
val resolver = getProtocolHttpBindingResolver(ctx, defaultContentType)

smithy-swift-codegen/src/main/kotlin/software/amazon/smithy/swift/codegen/integration/HTTPProtocolCustomizable.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,6 @@ interface HTTPProtocolCustomizable {
6060
val unknownServiceErrorSymbol: Symbol
6161

6262
val defaultTimestampFormat: TimestampFormatTrait.Format
63+
64+
fun smokeTestGenerator(ctx: ProtocolGenerator.GenerationContext): SmokeTestGenerator
6365
}

0 commit comments

Comments
 (0)