Skip to content

Commit 5850ef0

Browse files
committed
Fix skipping DANGER/ERROR endpoint test validation
1 parent 86ffc6a commit 5850ef0

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

smithy-rules-engine/src/main/java/software/amazon/smithy/rulesengine/traits/EndpointTestsTraitValidator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ public List<ValidationEvent> validate(Model model) {
6868
|| event.getSeverity() == Severity.NOTE
6969
|| testCase.getExpect().getError().isPresent()) {
7070
events.add(event.toBuilder().severity(Severity.DANGER).build());
71+
} else {
72+
events.add(event);
7173
}
7274
}
7375
}
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[WARNING] smithy.example#InvalidService: This shape applies a trait that is unstable: smithy.rules#endpointTests | UnstableTrait
22
[DANGER] smithy.example#InvalidService: The operationInput value for an endpoint test does not match the operation's input shape: Invalid structure member `fizz` found for `smithy.example#GetThingInput` | EndpointTestsTrait.smithy.example#GetThingInput.fizz
3+
[ERROR] smithy.example#InvalidService: The operationInput value for an endpoint test does not match the operation's input shape.buzz: Expected string value for string shape, `smithy.api#String`; found number value, `1` | EndpointTestsTrait

smithy-rules-engine/src/test/resources/software/amazon/smithy/rulesengine/traits/errorfiles/missing-input-target.smithy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ apply InvalidService @endpointTests({
1919
operationInputs: [
2020
{
2121
operationName: "GetThing"
22-
operationParams: { fizz: "something", buzz: "a buzz value" }
22+
operationParams: { fizz: "something", buzz: 1 }
2323
}
2424
]
2525
expect: {

0 commit comments

Comments
 (0)