mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-09 06:25:07 +00:00
[DOCS] Document // TEARDOWN test snippet. (#44762)
The `// TEARDOWN` test snippet was added with #34716. You can use this snippet to end and clean up a test series started with `// TESTSETUP` or `// TEST[setup:name]`.
This commit is contained in:
parent
caf9411a72
commit
9524d71159
@ -31,6 +31,8 @@ for its modifiers:
|
|||||||
This is most useful when you have text and snippets that work together to
|
This is most useful when you have text and snippets that work together to
|
||||||
tell the story of some use case because it merges the snippets (and thus the
|
tell the story of some use case because it merges the snippets (and thus the
|
||||||
use case) into one big test.
|
use case) into one big test.
|
||||||
|
* You can't use `// TEST[continued]` immediately after `// TESTSETUP` or
|
||||||
|
`// TEARDOWN`.
|
||||||
* `// TEST[skip:reason]`: Skip this test. Replace `reason` with the actual
|
* `// TEST[skip:reason]`: Skip this test. Replace `reason` with the actual
|
||||||
reason to skip the test. Snippets without `// TEST` or `// CONSOLE` aren't
|
reason to skip the test. Snippets without `// TEST` or `// CONSOLE` aren't
|
||||||
considered tests anyway but this is useful for explicitly documenting the
|
considered tests anyway but this is useful for explicitly documenting the
|
||||||
@ -78,6 +80,9 @@ for its modifiers:
|
|||||||
over `// TEST[setup:name]` because it makes it more clear what steps have to
|
over `// TEST[setup:name]` because it makes it more clear what steps have to
|
||||||
be taken before the examples will work. Tip: `// TESTSETUP` can only be used
|
be taken before the examples will work. Tip: `// TESTSETUP` can only be used
|
||||||
on the first snippet of a document.
|
on the first snippet of a document.
|
||||||
|
* `// TEARDOWN`: Ends and cleans up a test series started with `// TESTSETUP` or
|
||||||
|
`// TEST[setup:name]`. You can use `// TEARDOWN` to set up multiple tests in
|
||||||
|
the same file.
|
||||||
* `// NOTCONSOLE`: Marks this snippet as neither `// CONSOLE` nor
|
* `// NOTCONSOLE`: Marks this snippet as neither `// CONSOLE` nor
|
||||||
`// TESTRESPONSE`, excluding it from the list of unconverted snippets. We
|
`// TESTRESPONSE`, excluding it from the list of unconverted snippets. We
|
||||||
should only use this for snippets that *are* JSON but are *not* responses or
|
should only use this for snippets that *are* JSON but are *not* responses or
|
||||||
|
Loading…
x
Reference in New Issue
Block a user