Unverified Commit d6e2944c authored by david-perez's avatar david-perez Committed by GitHub
Browse files

Refactor `testCodegenContext` (#1340)

Instead of fabricating a new service shape when the caller does not
explicitly provide one, first attempt to obtain one from the passed in
model, which is a more faithful test code generation context.
parent 5438979a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -80,7 +80,9 @@ fun testCodegenContext(
    model,
    testSymbolProvider(model),
    TestRuntimeConfig,
    serviceShape ?: ServiceShape.builder().version("test").id("test#Service").build(),
    serviceShape
        ?: model.serviceShapes.firstOrNull()
        ?: ServiceShape.builder().version("test").id("test#Service").build(),
    ShapeId.from("test#Protocol"),
    settings, mode
)