Skip to content

Commit faa91de

Browse files
committed
Simplify ConfigProperty, un-ignore test
1 parent 52384f4 commit faa91de

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/rendering/util/RuntimeConfigProperty.kt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,7 @@ object RuntimeConfigProperty {
177177

178178
val AuthSchemePreference = ConfigProperty {
179179
name = "authSchemePreference"
180-
181-
val target = RuntimeTypes.Auth.Identity.AuthSchemeId
182-
183-
symbol = KotlinTypes.Collections.list(target, isNullable = true)
184-
builderSymbol = KotlinTypes.Collections.list(target, isNullable = true)
185-
180+
symbol = KotlinTypes.Collections.list(RuntimeTypes.Auth.Identity.AuthSchemeId, isNullable = true)
186181
baseClass = RuntimeTypes.Auth.HttpAuth.HttpAuthConfig
187182
useNestedBuilderBaseClass()
188183

codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/rendering/ServiceClientConfigGeneratorTest.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import software.amazon.smithy.kotlin.codegen.rendering.util.RuntimeConfigPropert
1919
import software.amazon.smithy.kotlin.codegen.test.*
2020
import software.amazon.smithy.model.Model
2121
import software.amazon.smithy.model.shapes.ServiceShape
22-
import kotlin.test.Ignore
2322
import kotlin.test.Test
2423

2524
class ServiceClientConfigGeneratorTest {
@@ -219,7 +218,6 @@ public class Config private constructor(builder: Builder) {
219218
contents.shouldContain(expectedProps)
220219
}
221220

222-
@Ignore
223221
@Test
224222
fun `it overrides props by name`() {
225223
val model = getModel()
@@ -247,7 +245,7 @@ public class Config private constructor(builder: Builder) {
247245
// Expect logMode config value to override default to LogMode.Request
248246
val expectedConfigValues = """
249247
override val clientName: String = builder.clientName
250-
override val authSchemePreference: kotlin.collections.List<aws.smithy.kotlin.runtime.auth.AuthSchemeId> = builder.authSchemePreference
248+
override val authSchemePreference: kotlin.collections.List<aws.smithy.kotlin.runtime.auth.AuthSchemeId>? = builder.authSchemePreference
251249
override val authSchemes: kotlin.collections.List<aws.smithy.kotlin.runtime.http.auth.AuthScheme> = builder.authSchemes
252250
public val customProp: Int? = builder.customProp
253251
public val endpointProvider: TestEndpointProvider = requireNotNull(builder.endpointProvider) { "endpointProvider is a required configuration property" }

0 commit comments

Comments
 (0)