Skip to content

Commit c83ea8d

Browse files
committed
misc: enable smoke tests
1 parent aa50a72 commit c83ea8d

File tree

3 files changed

+34
-6
lines changed

3 files changed

+34
-6
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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.SectionWriterBinding
6+
import software.amazon.smithy.kotlin.codegen.rendering.smoketests.SmokeTestSectionIds.SmokeTestsFile
7+
import software.amazon.smithy.model.Model
8+
9+
/**
10+
* SDK ID's of services that are deny listed from smoke test code generation.
11+
*/
12+
val smokeTestDenyList = setOf(
13+
"S3Tables",
14+
)
15+
16+
/**
17+
* Will wipe the smoke test runner file for services that are deny listed.
18+
*
19+
* Some services model smoke tests incorrectly and the code generated file will not compile.
20+
*/
21+
class SmokeTestsDenyListIntegration : KotlinIntegration {
22+
override fun enabledForService(model: Model, settings: KotlinSettings): Boolean =
23+
settings.sdkId in smokeTestDenyList
24+
25+
override val sectionWriters: List<SectionWriterBinding>
26+
get() = listOf(
27+
SectionWriterBinding(
28+
SmokeTestsFile,
29+
) { writer, _ ->
30+
writer.write("// Smoke tests for service deny listed")
31+
},
32+
)
33+
}

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,6 +43,7 @@ aws.sdk.kotlin.codegen.customization.s3.express.S3ExpressIntegration
4343
aws.sdk.kotlin.codegen.customization.s3.S3ExpiresIntegration
4444
aws.sdk.kotlin.codegen.BusinessMetricsIntegration
4545
aws.sdk.kotlin.codegen.smoketests.AwsSmokeTestsRunnerGeneratorIntegration
46+
aws.sdk.kotlin.codegen.smoketests.SmokeTestsDenyListIntegration
4647
aws.sdk.kotlin.codegen.smoketests.testing.SmokeTestSuccessHttpEngineIntegration
4748
aws.sdk.kotlin.codegen.smoketests.testing.SmokeTestFailHttpEngineIntegration
4849
aws.sdk.kotlin.codegen.customization.AwsQueryModeCustomization

tests/codegen/smoke-tests/src/test/kotlin/SmokeTestE2ETest.kt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ import org.gradle.testkit.runner.GradleRunner
44
import java.io.File
55
import kotlin.test.*
66

7-
// FIXME: Enable smoke test E2E tests
87
class SmokeTestE2ETest {
9-
@Ignore
108
@Test
119
fun successService() {
1210
val smokeTestRunnerOutput = runSmokeTests("successService")
@@ -15,15 +13,13 @@ class SmokeTestE2ETest {
1513
assertContains(smokeTestRunnerOutput, "ok SuccessService SuccessTestWithTags - no error expected from service")
1614
}
1715

18-
@Ignore
1916
@Test
2017
fun failureService() {
2118
val smokeTestRunnerOutput = runSmokeTests("failureService")
2219

2320
assertContains(smokeTestRunnerOutput, "ok FailureService FailuresTest - error expected from service")
2421
}
2522

26-
@Ignore
2723
@Test
2824
fun exceptionService() {
2925
val smokeTestRunnerOutput = runSmokeTests("exceptionService", expectingFailure = true)
@@ -34,7 +30,6 @@ class SmokeTestE2ETest {
3430
assertContains(smokeTestRunnerOutput, "#\tat aws.smithy.kotlin.runtime.http.interceptors.InterceptorExecutor.readBeforeDeserialization(InterceptorExecutor.kt:252)")
3531
}
3632

37-
@Ignore
3833
@Test
3934
fun successServiceSkipTags() {
4035
val envVars = mapOf(AWS_SKIP_TAGS to "success")
@@ -44,7 +39,6 @@ class SmokeTestE2ETest {
4439
assertContains(smokeTestRunnerOutput, "ok SuccessService SuccessTestWithTags - no error expected from service # skip")
4540
}
4641

47-
@Ignore
4842
@Test
4943
fun successServiceServiceFilter() {
5044
val envVars = mapOf(AWS_SERVICE_FILTER to "Failure") // Only run tests for services with this SDK ID

0 commit comments

Comments
 (0)