Browse Source

[DOCS] Update readme for testing x-pack code snippets (#30696)

Lisa Cawley 7 years ago
parent
commit
3960a7a310
2 changed files with 11 additions and 1 deletions
  1. 8 0
      CONTRIBUTING.md
  2. 3 1
      docs/README.asciidoc

+ 8 - 0
CONTRIBUTING.md

@@ -209,6 +209,14 @@ Before submitting your changes, run the test suite to make sure that nothing is
 ./gradlew check
 ./gradlew check
 ```
 ```
 
 
+If your changes affect only the documentation, run:
+
+```sh
+./gradlew -p docs check
+```
+For more information about testing code examples in the documentation, see 
+https://github.com/elastic/elasticsearch/blob/master/docs/README.asciidoc
+
 ### Project layout
 ### Project layout
 
 
 This repository is split into many top level directories. The most important
 This repository is split into many top level directories. The most important

+ 3 - 1
docs/README.asciidoc

@@ -6,7 +6,9 @@ See: https://github.com/elastic/docs
 Snippets marked with `// CONSOLE` are automatically annotated with "VIEW IN
 Snippets marked with `// CONSOLE` are automatically annotated with "VIEW IN
 CONSOLE" and "COPY AS CURL" in the documentation and are automatically tested
 CONSOLE" and "COPY AS CURL" in the documentation and are automatically tested
 by the command `gradle :docs:check`. To test just the docs from a single page,
 by the command `gradle :docs:check`. To test just the docs from a single page,
-use e.g. `gradle :docs:check -Dtests.method="*rollover*"`.
+use e.g. `gradle :docs:check -Dtests.method="\*rollover*"`.
+
+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. 
 
 
 By default each `// CONSOLE` snippet runs as its own isolated test. You can
 By default each `// CONSOLE` snippet runs as its own isolated test. You can
 manipulate the test execution in the following ways:
 manipulate the test execution in the following ways: