Skip to content

Commit 487dd1f

Browse files
author
Fahad Zubair
committed
Test for validationexception missing should explictly disable flag
1 parent 6dec72a commit 487dd1f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/customizations/PostprocessValidationExceptionNotAttachedErrorMessageDecoratorTest.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import io.kotest.matchers.string.shouldContain
1010
import org.junit.jupiter.api.Test
1111
import org.junit.jupiter.api.assertThrows
1212
import software.amazon.smithy.codegen.core.CodegenException
13+
import software.amazon.smithy.model.node.Node
14+
import software.amazon.smithy.rust.codegen.core.testutil.IntegrationTestParams
1315
import software.amazon.smithy.rust.codegen.core.testutil.asSmithyModel
1416
import software.amazon.smithy.rust.codegen.server.smithy.LogMessage
1517
import software.amazon.smithy.rust.codegen.server.smithy.ValidationResult
@@ -68,6 +70,16 @@ internal class PostprocessValidationExceptionNotAttachedErrorMessageDecoratorTes
6870
assertThrows<CodegenException> {
6971
serverIntegrationTest(
7072
model,
73+
params =
74+
IntegrationTestParams(
75+
additionalSettings =
76+
Node.objectNodeBuilder().withMember(
77+
"codegen",
78+
Node.objectNodeBuilder()
79+
.withMember("addValidationExceptionToConstrainedOperations", false)
80+
.build(),
81+
).build(),
82+
),
7183
additionalDecorators = listOf(validationExceptionNotAttachedErrorMessageDummyPostprocessorDecorator),
7284
testCoverage = HttpTestType.Default,
7385
)

0 commit comments

Comments
 (0)