@@ -10,10 +10,10 @@ import software.amazon.smithy.kotlin.codegen.model.isStringEnumShape
1010import software.amazon.smithy.kotlin.codegen.rendering.endpoints.EndpointParametersGenerator
1111import software.amazon.smithy.kotlin.codegen.rendering.endpoints.EndpointProviderGenerator
1212import software.amazon.smithy.kotlin.codegen.rendering.protocol.stringToNumber
13- import software.amazon.smithy.kotlin.codegen.rendering.smoketests.ClientConfig.EndpointParams
14- import software.amazon.smithy.kotlin.codegen.rendering.smoketests.ClientConfig.EndpointProvider
15- import software.amazon.smithy.kotlin.codegen.rendering.smoketests.ClientConfig.Name
16- import software.amazon.smithy.kotlin.codegen.rendering.smoketests.ClientConfig.Value
13+ import software.amazon.smithy.kotlin.codegen.rendering.smoketests.SmokeTestSectionIds. ClientConfig.EndpointParams
14+ import software.amazon.smithy.kotlin.codegen.rendering.smoketests.SmokeTestSectionIds. ClientConfig.EndpointProvider
15+ import software.amazon.smithy.kotlin.codegen.rendering.smoketests.SmokeTestSectionIds. ClientConfig.Name
16+ import software.amazon.smithy.kotlin.codegen.rendering.smoketests.SmokeTestSectionIds. ClientConfig.Value
1717import software.amazon.smithy.kotlin.codegen.rendering.util.format
1818import software.amazon.smithy.kotlin.codegen.utils.dq
1919import software.amazon.smithy.kotlin.codegen.utils.toCamelCase
@@ -26,16 +26,18 @@ import software.amazon.smithy.smoketests.traits.SmokeTestsTrait
2626import kotlin.jvm.optionals.getOrNull
2727
2828// Section IDs
29- object AdditionalEnvironmentVariables : SectionId
30- object DefaultClientConfig : SectionId
31- object HttpEngineOverride : SectionId
32- object ServiceFilter : SectionId
33- object SkipTags : SectionId
34- object ClientConfig : SectionId {
35- val Name : SectionKey <String > = SectionKey (" aws.smithy.kotlin#SmokeTestClientConfigName" )
36- val Value : SectionKey <String > = SectionKey (" aws.smithy.kotlin#SmokeTestClientConfigValue" )
37- val EndpointProvider : SectionKey <Symbol > = SectionKey (" aws.smithy.kotlin#SmokeTestEndpointProvider" )
38- val EndpointParams : SectionKey <Symbol > = SectionKey (" aws.smithy.kotlin#SmokeTestClientEndpointParams" )
29+ object SmokeTestSectionIds {
30+ object AdditionalEnvironmentVariables : SectionId
31+ object DefaultClientConfig : SectionId
32+ object HttpEngineOverride : SectionId
33+ object ServiceFilter : SectionId
34+ object SkipTags : SectionId
35+ object ClientConfig : SectionId {
36+ val Name : SectionKey <String > = SectionKey (" aws.smithy.kotlin#SmokeTestClientConfigName" )
37+ val Value : SectionKey <String > = SectionKey (" aws.smithy.kotlin#SmokeTestClientConfigValue" )
38+ val EndpointProvider : SectionKey <Symbol > = SectionKey (" aws.smithy.kotlin#SmokeTestEndpointProvider" )
39+ val EndpointParams : SectionKey <Symbol > = SectionKey (" aws.smithy.kotlin#SmokeTestClientEndpointParams" )
40+ }
3941}
4042
4143/* *
@@ -61,7 +63,7 @@ class SmokeTestsRunnerGenerator(
6163 internal fun render () {
6264 writer.write(" private var exitCode = 0" )
6365 renderEnvironmentVariables()
64- writer.declareSection(AdditionalEnvironmentVariables )
66+ writer.declareSection(SmokeTestSectionIds . AdditionalEnvironmentVariables )
6567 writer.write(" " )
6668 writer.withBlock(" public suspend fun main() {" , " }" ) {
6769 renderFunctionCalls()
@@ -77,7 +79,7 @@ class SmokeTestsRunnerGenerator(
7779 " private val skipTags = #T.System.getenv(" ,
7880 RuntimeTypes .Core .Utils .PlatformProvider ,
7981 )
80- writer.declareSection(SkipTags ) {
82+ writer.declareSection(SmokeTestSectionIds . SkipTags ) {
8183 writer.writeInline(" #S" , SKIP_TAGS )
8284 }
8385 writer.write(
@@ -90,7 +92,7 @@ class SmokeTestsRunnerGenerator(
9092 " private val serviceFilter = #T.System.getenv(" ,
9193 RuntimeTypes .Core .Utils .PlatformProvider ,
9294 )
93- writer.declareSection(ServiceFilter ) {
95+ writer.declareSection(SmokeTestSectionIds . ServiceFilter ) {
9496 writer.writeInline(" #S" , SERVICE_FILTER )
9597 }
9698 writer.write(
@@ -152,10 +154,10 @@ class SmokeTestsRunnerGenerator(
152154 writer.write(" interceptors.add(#T())" , RuntimeTypes .HttpClient .Interceptors .SmokeTestsInterceptor )
153155 }
154156
155- writer.declareSection(HttpEngineOverride )
157+ writer.declareSection(SmokeTestSectionIds . HttpEngineOverride )
156158
157159 if (! testCase.hasClientConfig) {
158- writer.declareSection(DefaultClientConfig )
160+ writer.declareSection(SmokeTestSectionIds . DefaultClientConfig )
159161 return
160162 }
161163
@@ -164,7 +166,7 @@ class SmokeTestsRunnerGenerator(
164166 val value = config.value.format()
165167
166168 writer.declareSection(
167- ClientConfig ,
169+ SmokeTestSectionIds . ClientConfig ,
168170 mapOf (
169171 Name to name,
170172 Value to value,
0 commit comments