Skip to content

Commit 08aea5a

Browse files
committed
Restore deprecated params in .json files. Expect warnings in yml tests.
1 parent 7b18fd6 commit 08aea5a

15 files changed

+118
-2
lines changed

x-pack/plugin/src/test/resources/rest-api-spec/api/cat.ml_datafeeds.json

+6
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@
3333
"required":false,
3434
"description":"Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)"
3535
},
36+
"allow_no_datafeeds":{
37+
"type":"boolean",
38+
"required":false,
39+
"description":"Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)",
40+
"deprecated":true
41+
},
3642
"format":{
3743
"type":"string",
3844
"description":"a short version of the Accept header, e.g. json, yaml"

x-pack/plugin/src/test/resources/rest-api-spec/api/cat.ml_jobs.json

+6
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@
3333
"required":false,
3434
"description":"Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)"
3535
},
36+
"allow_no_jobs":{
37+
"type":"boolean",
38+
"required":false,
39+
"description":"Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)",
40+
"deprecated":true
41+
},
3642
"bytes":{
3743
"type":"enum",
3844
"description":"The unit in which to display byte values",

x-pack/plugin/src/test/resources/rest-api-spec/api/ml.close_job.json

+6
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@
2727
"required":false,
2828
"description":"Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)"
2929
},
30+
"allow_no_jobs":{
31+
"type":"boolean",
32+
"required":false,
33+
"description":"Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)",
34+
"deprecated":true
35+
},
3036
"force":{
3137
"type":"boolean",
3238
"required":false,

x-pack/plugin/src/test/resources/rest-api-spec/api/ml.get_datafeed_stats.json

+6
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@
3232
"type":"boolean",
3333
"required":false,
3434
"description":"Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)"
35+
},
36+
"allow_no_datafeeds":{
37+
"type":"boolean",
38+
"required":false,
39+
"description":"Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)",
40+
"deprecated":true
3541
}
3642
}
3743
}

x-pack/plugin/src/test/resources/rest-api-spec/api/ml.get_datafeeds.json

+6
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@
3232
"type":"boolean",
3333
"required":false,
3434
"description":"Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)"
35+
},
36+
"allow_no_datafeeds":{
37+
"type":"boolean",
38+
"required":false,
39+
"description":"Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)",
40+
"deprecated":true
3541
}
3642
}
3743
}

x-pack/plugin/src/test/resources/rest-api-spec/api/ml.get_job_stats.json

+6
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@
3232
"type":"boolean",
3333
"required":false,
3434
"description":"Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)"
35+
},
36+
"allow_no_jobs":{
37+
"type":"boolean",
38+
"required":false,
39+
"description":"Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)",
40+
"deprecated":true
3541
}
3642
}
3743
}

x-pack/plugin/src/test/resources/rest-api-spec/api/ml.get_jobs.json

+6
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@
3232
"type":"boolean",
3333
"required":false,
3434
"description":"Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)"
35+
},
36+
"allow_no_jobs":{
37+
"type":"boolean",
38+
"required":false,
39+
"description":"Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)",
40+
"deprecated":true
3541
}
3642
}
3743
}

x-pack/plugin/src/test/resources/rest-api-spec/api/ml.get_overall_buckets.json

+5
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@
5050
"allow_no_match":{
5151
"type":"boolean",
5252
"description":"Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)"
53+
},
54+
"allow_no_jobs":{
55+
"type":"boolean",
56+
"description":"Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)",
57+
"deprecated":true
5358
}
5459
},
5560
"body":{

x-pack/plugin/src/test/resources/rest-api-spec/api/ml.stop_datafeed.json

+6
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@
2727
"required":false,
2828
"description":"Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)"
2929
},
30+
"allow_no_datafeeds":{
31+
"type":"boolean",
32+
"required":false,
33+
"description":"Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)",
34+
"deprecated":true
35+
},
3036
"force":{
3137
"type":"boolean",
3238
"required":false,

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

+10
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ setup:
5454

5555
---
5656
"Test get datafeed with expression that does not match and allow_no_match":
57+
- skip:
58+
features:
59+
- "warnings"
5760

5861
- do:
5962
ml.get_datafeeds:
@@ -63,6 +66,8 @@ setup:
6366
- match: { datafeeds: [] }
6467

6568
- do:
69+
warnings:
70+
- 'Deprecated field [allow_no_datafeeds] used, expected [allow_no_match] instead'
6671
ml.get_datafeeds:
6772
datafeed_id: "missing-*"
6873
allow_no_datafeeds: true
@@ -71,6 +76,9 @@ setup:
7176

7277
---
7378
"Test get datafeed with expression that does not match and not allow_no_match":
79+
- skip:
80+
features:
81+
- "warnings"
7482

7583
- do:
7684
catch: missing
@@ -79,6 +87,8 @@ setup:
7987
allow_no_match: false
8088

8189
- do:
90+
warnings:
91+
- 'Deprecated field [allow_no_datafeeds] used, expected [allow_no_match] instead'
8292
catch: missing
8393
ml.get_datafeeds:
8494
datafeed_id: "missing-*"

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

+10
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ setup:
103103

104104
---
105105
"Test get datafeed stats with expression that does not match and allow_no_match":
106+
- skip:
107+
features:
108+
- "warnings"
106109

107110
- do:
108111
ml.get_datafeed_stats:
@@ -112,6 +115,8 @@ setup:
112115
- match: { datafeeds: [] }
113116

114117
- do:
118+
warnings:
119+
- 'Deprecated field [allow_no_datafeeds] used, expected [allow_no_match] instead'
115120
ml.get_datafeed_stats:
116121
datafeed_id: "missing-*"
117122
allow_no_datafeeds: true
@@ -120,6 +125,9 @@ setup:
120125

121126
---
122127
"Test get datafeed stats with expression that does not match and not allow_no_match":
128+
- skip:
129+
features:
130+
- "warnings"
123131

124132
- do:
125133
catch: missing
@@ -128,6 +136,8 @@ setup:
128136
allow_no_match: false
129137

130138
- do:
139+
warnings:
140+
- 'Deprecated field [allow_no_datafeeds] used, expected [allow_no_match] instead'
131141
catch: missing
132142
ml.get_datafeed_stats:
133143
datafeed_id: "missing-*"

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

+20-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515

1616
---
1717
"Test get jobs with expression that does not match and allow_no_match":
18+
- skip:
19+
features:
20+
- "warnings"
1821

1922
- do:
2023
ml.get_jobs:
@@ -24,6 +27,8 @@
2427
- match: { jobs: [] }
2528

2629
- do:
30+
warnings:
31+
- 'Deprecated field [allow_no_jobs] used, expected [allow_no_match] instead'
2732
ml.get_jobs:
2833
job_id: "missing-*"
2934
allow_no_jobs: true
@@ -32,6 +37,9 @@
3237

3338
---
3439
"Test get jobs with expression that does not match and not allow_no_match":
40+
- skip:
41+
features:
42+
- "warnings"
3543

3644
- do:
3745
catch: missing
@@ -40,6 +48,8 @@
4048
allow_no_match: false
4149

4250
- do:
51+
warnings:
52+
- 'Deprecated field [allow_no_jobs] used, expected [allow_no_match] instead'
4353
catch: missing
4454
ml.get_jobs:
4555
job_id: "missing-*"
@@ -863,6 +873,9 @@
863873

864874
---
865875
"Test close jobs with expression that does not match and allow_no_match":
876+
- skip:
877+
features:
878+
- "warnings"
866879

867880
- do:
868881
ml.close_job:
@@ -871,13 +884,18 @@
871884
- match: { closed: true }
872885

873886
- do:
887+
warnings:
888+
- 'Deprecated field [allow_no_jobs] used, expected [allow_no_match] instead'
874889
ml.close_job:
875890
job_id: "missing-*"
876891
allow_no_jobs: true
877892
- match: { closed: true }
878893

879894
---
880895
"Test close jobs with expression that does not match and not allow_no_match":
896+
- skip:
897+
features:
898+
- "warnings"
881899

882900
- do:
883901
catch: missing
@@ -886,6 +904,8 @@
886904
allow_no_match: false
887905

888906
- do:
907+
warnings:
908+
- 'Deprecated field [allow_no_jobs] used, expected [allow_no_match] instead'
889909
catch: missing
890910
ml.close_job:
891911
job_id: "missing-*"
@@ -1581,7 +1601,6 @@
15811601
- skip:
15821602
features:
15831603
- "warnings"
1584-
- "allowed_warnings"
15851604

15861605
- do:
15871606
catch: missing

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

+5
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,9 @@ setup:
240240

241241
---
242242
"Test overall buckets given non-matching expression and not allow_no_match":
243+
- skip:
244+
features:
245+
- "warnings"
243246

244247
- do:
245248
catch: missing
@@ -248,6 +251,8 @@ setup:
248251
allow_no_match: false
249252

250253
- do:
254+
warnings:
255+
- 'Deprecated field [allow_no_jobs] used, expected [allow_no_match] instead'
251256
catch: missing
252257
ml.get_overall_buckets:
253258
job_id: "none-matching-*"

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

+10
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,9 @@ setup:
207207

208208
---
209209
"Test get job stats given pattern and allow_no_match":
210+
- skip:
211+
features:
212+
- "warnings"
210213

211214
- do:
212215
ml.get_job_stats:
@@ -215,13 +218,18 @@ setup:
215218
- match: { count: 0 }
216219

217220
- do:
221+
warnings:
222+
- 'Deprecated field [allow_no_jobs] used, expected [allow_no_match] instead'
218223
ml.get_job_stats:
219224
job_id: "missing-*"
220225
allow_no_jobs: true
221226
- match: { count: 0 }
222227

223228
---
224229
"Test get job stats given pattern and not allow_no_match":
230+
- skip:
231+
features:
232+
- "warnings"
225233

226234
- do:
227235
catch: missing
@@ -230,6 +238,8 @@ setup:
230238
allow_no_match: false
231239

232240
- do:
241+
warnings:
242+
- 'Deprecated field [allow_no_jobs] used, expected [allow_no_match] instead'
233243
catch: missing
234244
ml.get_job_stats:
235245
job_id: "missing-*"

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

+10-1
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,9 @@ setup:
241241

242242
---
243243
"Test stop with expression that does not match and allow_no_match":
244+
- skip:
245+
features:
246+
- "warnings"
244247

245248
- do:
246249
ml.stop_datafeed:
@@ -249,13 +252,18 @@ setup:
249252
- match: { stopped: true }
250253

251254
- do:
255+
warnings:
256+
- 'Deprecated field [allow_no_datafeeds] used, expected [allow_no_match] instead'
252257
ml.stop_datafeed:
253258
datafeed_id: "missing-*"
254259
allow_no_datafeeds: true
255260
- match: { stopped: true }
256261

257262
---
258263
"Test stop with expression that does not match and not allow_no_match":
264+
- skip:
265+
features:
266+
- "warnings"
259267

260268
- do:
261269
catch: missing
@@ -264,6 +272,8 @@ setup:
264272
allow_no_match: false
265273

266274
- do:
275+
warnings:
276+
- 'Deprecated field [allow_no_datafeeds] used, expected [allow_no_match] instead'
267277
catch: missing
268278
ml.stop_datafeed:
269279
datafeed_id: "missing-*"
@@ -274,7 +284,6 @@ setup:
274284
- skip:
275285
features:
276286
- "warnings"
277-
- "allowed_warnings"
278287

279288
- do:
280289
catch: missing

0 commit comments

Comments
 (0)