Skip to content

Commit 7763a69

Browse files
[ML] Remove direct access to system index from filter_crud REST test (#63111)
This test accesses system indices for 2 reasons. First, it creates a filter that has a different type. This was done to assert that filter is not returned from the APIs. However, now that access to the `.ml-meta` index is restricted, it is not really a concern. Second, it creates a `.ml-meta` index without mappings to test the get API does not fail due to lack of mappings on a sorted field, namely the `filter_id`. Once again, this test is less useful once system indices have restricted access. Relates #62501
1 parent da2681e commit 7763a69

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

x-pack/plugin/src/test/resources/rest-api-spec/test/ml/filter_crud.yml

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,6 @@ setup:
33
- skip:
44
features:
55
- headers
6-
- allowed_warnings
7-
- do:
8-
headers:
9-
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
10-
Content-Type: application/json
11-
allowed_warnings:
12-
- "index [.ml-meta] matches multiple legacy templates [.ml-meta, global], composable templates will only match a single template"
13-
index:
14-
index: .ml-meta
15-
id: filter_imposter-filter
16-
body: >
17-
{
18-
"filter_id": "imposter",
19-
"items": ["a", "b"],
20-
"type": "imposter"
21-
}
226

237
- do:
248
headers:
@@ -317,19 +301,3 @@ setup:
317301
- match: { count: 0 }
318302
- match: { filters: [] }
319303

320-
---
321-
"Test get all filter given index exists but no mapping for filter_id":
322-
323-
- do:
324-
indices.delete:
325-
index: ".ml-meta"
326-
- do:
327-
allowed_warnings:
328-
- "index [.ml-meta] matches multiple legacy templates [.ml-meta, global], composable templates will only match a single template"
329-
indices.create:
330-
index: ".ml-meta"
331-
332-
- do:
333-
ml.get_filters: {}
334-
- match: { count: 0 }
335-
- match: { filters: [] }

0 commit comments

Comments
 (0)