-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: evaluate output values before schema checking.
Signed-off-by: dblock <[email protected]>
- Loading branch information
Showing
8 changed files
with
148 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...s/tests/tester/fixtures/evals/passed.yaml → .../tester/fixtures/evals/passed/passed.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
display_path: passed/value_type.yaml | ||
full_path: tools/tests/tester/fixtures/stories/passed/value_type.yaml | ||
|
||
result: PASSED | ||
description: This story has an error trying to reuse a variable of a different type. | ||
warnings: | ||
- | | ||
Multiple paths detected, please group similar tests together and move paths not being tested to prologues or epilogues. | ||
/_cat/health | ||
/{index} | ||
prologues: | ||
- overall: | ||
result: PASSED | ||
title: GET / | ||
output: | ||
outputs: | ||
boolean: false | ||
epilogues: | ||
- overall: | ||
result: PASSED | ||
title: DELETE /movies | ||
chapters: | ||
- title: This chapter requires a boolean in the parameters. | ||
overall: | ||
result: PASSED | ||
path: GET /_cat/health | ||
operation: | ||
method: GET | ||
path: /_cat/health | ||
request: | ||
parameters: | ||
format: | ||
result: PASSED | ||
v: | ||
result: PASSED | ||
request: | ||
result: PASSED | ||
response: | ||
status: | ||
result: PASSED | ||
payload_body: | ||
result: PASSED | ||
payload_schema: | ||
result: PASSED | ||
output_values: | ||
result: SKIPPED | ||
- title: This chapter requires a boolean in the body. | ||
overall: | ||
result: PASSED | ||
path: PUT /{index} | ||
operation: | ||
method: PUT | ||
path: /{index} | ||
request: | ||
parameters: | ||
index: | ||
result: PASSED | ||
request: | ||
result: PASSED | ||
response: | ||
status: | ||
result: PASSED | ||
payload_body: | ||
result: PASSED | ||
payload_schema: | ||
result: PASSED | ||
output_values: | ||
result: SKIPPED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tests/tester/fixtures/stories/passed.yaml → ...ester/fixtures/stories/passed/passed.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
tools/tests/tester/fixtures/stories/passed/value_type.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
$schema: ../../../../../../json_schemas/test_story.schema.yaml | ||
|
||
description: This story has an error trying to reuse a variable of a different type. | ||
|
||
prologues: | ||
- method: GET | ||
id: root | ||
path: / | ||
output: | ||
boolean: payload.version.build_snapshot | ||
epilogues: | ||
- method: DELETE | ||
path: /movies | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: This chapter requires a boolean in the parameters. | ||
method: GET | ||
path: /_cat/health | ||
parameters: | ||
format: json | ||
v: ${root.boolean} | ||
- synopsis: This chapter requires a boolean in the body. | ||
method: PUT | ||
path: /{index} | ||
parameters: | ||
index: movies | ||
request: | ||
payload: | ||
settings: | ||
shard: | ||
check_on_startup: ${root.boolean} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters