Pārlūkot izejas kodu

CONSOLE is the new AUTOSENSE

This makes the test generation support both while we move from
`// AUTOSENSE` to `// CONSOLE`.

Will bother #18160
Nik Everett 9 gadi atpakaļ
vecāks
revīzija
2528934411

+ 2 - 1
buildSrc/src/main/groovy/org/elasticsearch/gradle/SnippetsTask.groovy

@@ -110,7 +110,8 @@ public class SnippetsTask extends DefaultTask {
                     lastLanguageLine = lineNumber
                     return
                 }
-                if (line ==~ /\/\/ AUTOSENSE\s*/) {
+                if (line ==~ /\/\/ AUTOSENSE\s*/
+                        || line ==~ /\/\/ CONSOLE\s*/) {
                     if (snippet == null) {
                         throw new InvalidUserDataException("AUTOSENSE not " +
                             "paired with a snippet at $file:$lineNumber")

+ 1 - 1
docs/reference/docs/index_.asciidoc

@@ -14,7 +14,7 @@ PUT twitter/tweet/1
     "message" : "trying out Elasticsearch"
 }
 --------------------------------------------------
-// AUTOSENSE
+// CONSOLE
 
 The result of the above index operation is: