Skip to content

Commit 3960a7a

Browse files
authored
[DOCS] Update readme for testing x-pack code snippets (#30696)
1 parent 532641e commit 3960a7a

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

CONTRIBUTING.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,14 @@ Before submitting your changes, run the test suite to make sure that nothing is
209209
./gradlew check
210210
```
211211

212+
If your changes affect only the documentation, run:
213+
214+
```sh
215+
./gradlew -p docs check
216+
```
217+
For more information about testing code examples in the documentation, see
218+
https://github.com/elastic/elasticsearch/blob/master/docs/README.asciidoc
219+
212220
### Project layout
213221

214222
This repository is split into many top level directories. The most important

docs/README.asciidoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ See: https://github.com/elastic/docs
66
Snippets marked with `// CONSOLE` are automatically annotated with "VIEW IN
77
CONSOLE" and "COPY AS CURL" in the documentation and are automatically tested
88
by the command `gradle :docs:check`. To test just the docs from a single page,
9-
use e.g. `gradle :docs:check -Dtests.method="*rollover*"`.
9+
use e.g. `gradle :docs:check -Dtests.method="\*rollover*"`.
10+
11+
NOTE: If you have an elasticsearch-extra folder alongside your elasticsearch folder, you must temporarily rename it when you are testing 6.3 or later branches.
1012

1113
By default each `// CONSOLE` snippet runs as its own isolated test. You can
1214
manipulate the test execution in the following ways:

0 commit comments

Comments
 (0)