Skip to content

Commit 6c085df

Browse files
authored
misc: enable smoke tests (#1477)
1 parent d886580 commit 6c085df

File tree

4 files changed

+35
-8
lines changed

4 files changed

+35
-8
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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+
* Some services model smoke tests incorrectly and the code generated file will not compile.
19+
*/
20+
class SmokeTestsDenyListIntegration : KotlinIntegration {
21+
override fun enabledForService(model: Model, settings: KotlinSettings): Boolean =
22+
settings.sdkId in smokeTestDenyList
23+
24+
override val sectionWriters: List<SectionWriterBinding>
25+
get() = listOf(
26+
SectionWriterBinding(
27+
SmokeTestsFile,
28+
) { writer, _ ->
29+
writer.write("// Smoke tests for service are deny listed")
30+
},
31+
)
32+
}

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

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ coroutines-version = "1.9.0"
1111
atomicfu-version = "0.25.0"
1212

1313
# smithy-kotlin codegen and runtime are versioned separately
14-
smithy-kotlin-runtime-version = "1.3.28"
15-
smithy-kotlin-codegen-version = "0.33.28"
14+
smithy-kotlin-runtime-version = "1.3.29"
15+
smithy-kotlin-codegen-version = "0.33.29"
1616

1717
# codegen
1818
smithy-version = "1.51.0"

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)