فهرست منبع

Prohibit freezing the write index of a data stream (#57931)

Dan Hermann 5 سال پیش
والد
کامیت
ce73b62143
1فایلهای تغییر یافته به همراه33 افزوده شده و 0 حذف شده
  1. 33 0
      x-pack/plugin/src/test/resources/rest-api-spec/test/indices.freeze/10_basic.yml

+ 33 - 0
x-pack/plugin/src/test/resources/rest-api-spec/test/indices.freeze/10_basic.yml

@@ -122,3 +122,36 @@
             foo: hello
 
 - match: {hits.total: 1}
+
+---
+"Cannot freeze write index for data stream":
+  - skip:
+      version: " - 7.99.99"
+      reason: "change to 7.8.99 after backporting"
+      features: allowed_warnings
+
+  - do:
+      allowed_warnings:
+        - "index template [my-template1] has index patterns [simple-data-stream1] matching patterns from existing older templates [global] with patterns (global => [*]); this template [my-template1] will take precedence during new index creation"
+      indices.put_index_template:
+        name: my-template1
+        body:
+          index_patterns: [simple-data-stream1]
+          data_stream:
+            timestamp_field: '@timestamp'
+
+  - do:
+      indices.create_data_stream:
+        name: simple-data-stream1
+  - is_true: acknowledged
+
+  - do:
+      catch: bad_request
+      indices.freeze:
+        index: ".ds-simple-data-stream1-000001"
+
+  - do:
+      indices.delete_data_stream:
+        name: simple-data-stream1
+  - is_true: acknowledged
+