Skip to content

Commit 07ac881

Browse files
authored
[DOCS] Remove testenv annotations from doc snippet tests (#80023) (#80458)
Removes `testenv` annotations and related code. These annotations originally let you skip x-pack snippet tests in the docs. However, that's no longer possible. Relates to #79309, #31619 # Conflicts: # docs/reference/ml/df-analytics/apis/get-trained-model-deployment-stats.asciidoc # docs/reference/ml/df-analytics/apis/infer-trained-model-deployment.asciidoc # docs/reference/ml/df-analytics/apis/put-trained-model-definition-part.asciidoc # docs/reference/ml/df-analytics/apis/put-trained-model-vocabulary.asciidoc # docs/reference/ml/df-analytics/apis/start-trained-model-deployment.asciidoc # docs/reference/ml/df-analytics/apis/stop-trained-model-deployment.asciidoc # docs/reference/slm/apis/slm-delete.asciidoc # docs/reference/slm/apis/slm-execute-retention.asciidoc # docs/reference/slm/apis/slm-execute.asciidoc # docs/reference/slm/apis/slm-get-status.asciidoc # docs/reference/slm/apis/slm-get.asciidoc # docs/reference/slm/apis/slm-start.asciidoc # docs/reference/slm/apis/slm-stats.asciidoc # docs/reference/slm/apis/slm-stop.asciidoc # docs/reference/sql/endpoints/client-apps/tableau-desktop.asciidoc # docs/reference/sql/endpoints/client-apps/tableau-server.asciidoc
1 parent b9cbe95 commit 07ac881

File tree

327 files changed

+1
-348
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

327 files changed

+1
-348
lines changed

build-tools-internal/src/main/groovy/org/elasticsearch/gradle/internal/doc/RestTestsFromSnippetsTask.groovy

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -257,19 +257,6 @@ class RestTestsFromSnippetsTask extends SnippetsTask {
257257
current.println(" - stash_in_path")
258258
current.println(" - stash_path_replace")
259259
current.println(" - warnings")
260-
if (test.testEnv != null) {
261-
switch (test.testEnv) {
262-
case 'basic':
263-
case 'gold':
264-
case 'platinum':
265-
case 'enterprise':
266-
current.println(" - xpack")
267-
break;
268-
default:
269-
throw new InvalidUserDataException('Unsupported testEnv: '
270-
+ test.testEnv)
271-
}
272-
}
273260
}
274261
if (test.skip) {
275262
if (test.continued) {

build-tools-internal/src/main/groovy/org/elasticsearch/gradle/internal/doc/SnippetsTask.groovy

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ class SnippetsTask extends DefaultTask {
7373
Snippet snippet = null
7474
StringBuilder contents = null
7575
List substitutions = null
76-
String testEnv = null
7776
Closure emit = {
7877
snippet.contents = contents.toString()
7978
contents = null
@@ -140,14 +139,10 @@ class SnippetsTask extends DefaultTask {
140139
}
141140
file.eachLine('UTF-8') { String line, int lineNumber ->
142141
Matcher matcher
143-
matcher = line =~ /\[testenv="([^"]+)"\]\s*/
144-
if (matcher.matches()) {
145-
testEnv = matcher.group(1)
146-
}
147142
if (line ==~ /-{4,}\s*/) { // Four dashes looks like a snippet
148143
if (snippet == null) {
149144
Path path = docs.dir.toPath().relativize(file.toPath())
150-
snippet = new Snippet(path: path, start: lineNumber, testEnv: testEnv, name: name)
145+
snippet = new Snippet(path: path, start: lineNumber, name: name)
151146
if (lastLanguageLine == lineNumber - 1) {
152147
snippet.language = lastLanguage
153148
}
@@ -333,7 +328,6 @@ class SnippetsTask extends DefaultTask {
333328
int start
334329
int end = NOT_FINISHED
335330
String contents
336-
String testEnv
337331

338332
Boolean console = null
339333
boolean test = false
@@ -362,9 +356,6 @@ class SnippetsTask extends DefaultTask {
362356
}
363357
if (test) {
364358
result += '// TEST'
365-
if (testEnv != null) {
366-
result += "[testenv=$testEnv]"
367-
}
368359
if (catchPart) {
369360
result += "[catch: $catchPart]"
370361
}

docs/reference/aggregations/bucket/multi-terms-aggregation.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/aggregations/metrics/boxplot-aggregation.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/aggregations/metrics/geoline-aggregation.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/aggregations/metrics/rate-aggregation.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/aggregations/metrics/string-stats-aggregation.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/aggregations/metrics/t-test-aggregation.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/aggregations/metrics/top-metrics-aggregation.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/aggregations/pipeline/bucket-correlation-aggregation.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/aggregations/pipeline/bucket-count-ks-test-aggregation.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/aggregations/pipeline/cumulative-cardinality-aggregation.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/aggregations/pipeline/inference-bucket-aggregation.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/aggregations/pipeline/moving-percentiles-aggregation.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/aggregations/pipeline/normalize-aggregation.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/autoscaling/apis/autoscaling-apis.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/autoscaling/apis/delete-autoscaling-policy.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/autoscaling/apis/get-autoscaling-capacity.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/autoscaling/apis/get-autoscaling-policy.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/autoscaling/apis/put-autoscaling-policy.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/autoscaling/autoscaling-deciders.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/autoscaling/deciders/fixed-decider.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/autoscaling/deciders/machine-learning-decider.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/autoscaling/deciders/proactive-storage-decider.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/autoscaling/index.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/cat/anomaly-detectors.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/cat/datafeeds.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/cat/dataframeanalytics.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/cat/trainedmodel.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/ccr/apis/auto-follow/delete-auto-follow-pattern.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/ccr/apis/auto-follow/pause-auto-follow-pattern.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/ccr/apis/auto-follow/put-auto-follow-pattern.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/ccr/apis/auto-follow/resume-auto-follow-pattern.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/ccr/apis/ccr-apis.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/ccr/apis/follow-request-body.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/ccr/apis/follow/get-follow-info.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/ccr/apis/follow/get-follow-stats.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/ccr/apis/follow/post-forget-follower.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/ccr/apis/follow/post-pause-follow.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/ccr/apis/follow/post-resume-follow.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/ccr/apis/follow/post-unfollow.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/ccr/apis/follow/put-follow.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/ccr/apis/get-ccr-stats.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/ccr/auto-follow.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/ccr/getting-started.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/ccr/index.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/ccr/managing.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/ccr/upgrading.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/commands/migrate-tool.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/eql/delete-async-eql-search-api.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/eql/detect-threats-with-eql.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/eql/eql-search-api.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/eql/eql.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/eql/functions.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/eql/get-async-eql-search-api.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/eql/get-async-eql-status-api.asciidoc

Lines changed: 0 additions & 1 deletion

docs/reference/eql/pipes.asciidoc

Lines changed: 0 additions & 1 deletion

0 commit comments

Comments
 (0)