1
0
Эх сурвалжийг харах

Add allowed warnings to the dot-prefix yaml tests (#113560) (#113627)

This adds the missing optional warning from the global legacy template

Relates to #113529 (doesn't close it yet until this has been unmuted,
which won't happen until this change is backported to 8.16)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Lee Hinman 1 жил өмнө
parent
commit
fc8d6138ba

+ 5 - 2
modules/dot-prefix-validation/src/yamlRestTest/resources/rest-api-spec/test/dot_prefix/10_basic.yml

@@ -164,11 +164,13 @@ teardown:
 ---
 "Deprecated index template with a dot prefix index pattern":
   - requires:
-      test_runner_features: ["warnings", "headers"]
+      test_runner_features: ["warnings", "headers", "allowed_warnings"]
 
   - do:
       warnings:
         - "Index [.data-*] name begins with a dot (.), which is deprecated, and will not be allowed in a future Elasticsearch version."
+      allowed_warnings:
+        - "index template [my-template] has index patterns [regular, .data-*] matching patterns from existing older templates [global] with patterns (global => [*]); this template [my-template] will take precedence during new index creation"
       indices.put_index_template:
         name: my-template
         body:
@@ -177,7 +179,8 @@ teardown:
 
   - do:
       headers: { X-elastic-product-origin: kibana }
-      warnings:
+      allowed_warnings:
+        - "index template [my-template2] has index patterns [other, .data2-*] matching patterns from existing older templates [global] with patterns (global => [*]); this template [my-template2] will take precedence during new index creation"
       indices.put_index_template:
         name: my-template2
         body: