Skip to content

Commit e945f73

Browse files
committed
Re-add smoke test deny list
1 parent 602af10 commit e945f73

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package aws.sdk.kotlin.codegen.smoketests
2+
3+
import software.amazon.smithy.kotlin.codegen.KotlinSettings
4+
import software.amazon.smithy.kotlin.codegen.integration.KotlinIntegration
5+
import software.amazon.smithy.kotlin.codegen.integration.SectionWriter
6+
import software.amazon.smithy.kotlin.codegen.integration.SectionWriterBinding
7+
import software.amazon.smithy.kotlin.codegen.rendering.smoketests.SmokeTestsRunner
8+
import software.amazon.smithy.model.Model
9+
10+
/**
11+
* Will wipe the smoke test runner file for services that are deny listed.
12+
*
13+
* Some services model smoke tests incorrectly and the code generated file will not compile.
14+
*/
15+
class SmokeTestsDenyListIntegration : KotlinIntegration {
16+
override fun enabledForService(model: Model, settings: KotlinSettings): Boolean =
17+
settings.sdkId in smokeTestDenyList
18+
19+
override val sectionWriters: List<SectionWriterBinding>
20+
get() = listOf(
21+
SectionWriterBinding(SmokeTestsRunner, smokeTestDenyListSectionWriter),
22+
)
23+
24+
private val smokeTestDenyListSectionWriter = SectionWriter { writer, _ ->
25+
writer.write("// Smoke tests for service deny listed until model is fixed")
26+
}
27+
}
28+
29+
/**
30+
* SDK ID's of services that model smoke tests incorrectly
31+
*/
32+
val smokeTestDenyList = setOf(
33+
"Application Auto Scaling",
34+
"SWF",
35+
"WAFV2",
36+
)

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ aws.sdk.kotlin.codegen.customization.s3.express.SigV4S3ExpressAuthSchemeIntegrat
4343
aws.sdk.kotlin.codegen.customization.s3.express.S3ExpressIntegration
4444
aws.sdk.kotlin.codegen.customization.s3.S3ExpiresIntegration
4545
aws.sdk.kotlin.codegen.BusinessMetricsIntegration
46+
aws.sdk.kotlin.codegen.smoketests.SmokeTestsDenyListIntegration

0 commit comments

Comments
 (0)