Skip to content

Commit 05ed4a3

Browse files
Fix yml tests to specify content-type
1 parent 7eeb6c8 commit 05ed4a3

15 files changed

+48
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ setup:
3030
- do:
3131
headers:
3232
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
33+
Content-Type: application/json
3334
index:
3435
index: .ml-anomalies-custom-all-test-1
3536
type: doc
@@ -56,6 +57,7 @@ setup:
5657
- do:
5758
headers:
5859
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
60+
Content-Type: application/json
5961
index:
6062
index: .ml-anomalies-custom-all-test-2
6163
type: doc

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ setup:
3434
- do:
3535
headers:
3636
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
37+
Content-Type: application/json
3738
index:
3839
index: .ml-anomalies-delete-model-snapshot
3940
type: doc
@@ -76,6 +77,7 @@ setup:
7677
- do:
7778
headers:
7879
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
80+
Content-Type: application/json
7981
index:
8082
index: .ml-anomalies-delete-model-snapshot
8183
type: doc

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ setup:
44
- do:
55
headers:
66
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
7+
Content-Type: application/json
78
index:
89
index: .ml-meta
910
type: doc

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ setup:
1818
- do:
1919
headers:
2020
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
21+
Content-Type: application/json
2122
index:
2223
index: .ml-anomalies-get-model-snapshots
2324
type: doc
@@ -33,6 +34,7 @@ setup:
3334
- do:
3435
headers:
3536
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
37+
Content-Type: application/json
3638
index:
3739
index: .ml-state
3840
type: doc
@@ -44,6 +46,7 @@ setup:
4446
- do:
4547
headers:
4648
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
49+
Content-Type: application/json
4750
index:
4851
index: .ml-anomalies-get-model-snapshots
4952
type: doc

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,8 @@
556556
- do:
557557
headers:
558558
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
559+
Content-Type: application/json
560+
559561
index:
560562
index: .ml-anomalies-shared
561563
type: doc

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,8 @@
419419
- match: { job_id: "jobs-crud-model-memory-limit-decrease" }
420420

421421
- do:
422+
headers:
423+
Content-Type: application/json
422424
index:
423425
index: .ml-anomalies-shared
424426
type: doc
@@ -929,6 +931,8 @@
929931
"Test cannot create job with existing result document":
930932

931933
- do:
934+
headers:
935+
Content-Type: application/json
932936
index:
933937
index: .ml-anomalies-shared
934938
type: doc

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ setup:
1818
- do:
1919
headers:
2020
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
21+
Content-Type: application/json
2122
index:
2223
index: .ml-anomalies-jobs-get-result-buckets
2324
type: doc
@@ -34,6 +35,7 @@ setup:
3435
- do:
3536
headers:
3637
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
38+
Content-Type: application/json
3739
index:
3840
index: .ml-anomalies-jobs-get-result-buckets
3941
type: doc
@@ -50,6 +52,7 @@ setup:
5052
- do:
5153
headers:
5254
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
55+
Content-Type: application/json
5356
index:
5457
index: .ml-anomalies-jobs-get-result-buckets
5558
type: doc

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ setup:
1818
- do:
1919
headers:
2020
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
21+
Content-Type: application/json
2122
index:
2223
index: .ml-anomalies-jobs-get-result-categories
2324
type: doc
@@ -26,6 +27,7 @@ setup:
2627
- do:
2728
headers:
2829
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
30+
Content-Type: application/json
2931
index:
3032
index: .ml-anomalies-jobs-get-result-categories
3133
type: doc
@@ -34,6 +36,7 @@ setup:
3436
- do:
3537
headers:
3638
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
39+
Content-Type: application/json
3740
index:
3841
index: .ml-anomalies-unrelated
3942
type: doc

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ setup:
1818
- do:
1919
headers:
2020
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
21+
Content-Type: application/json
2122
index:
2223
index: .ml-anomalies-get-influencers-test
2324
type: doc
@@ -36,6 +37,7 @@ setup:
3637
- do:
3738
headers:
3839
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
40+
Content-Type: application/json
3941
index:
4042
index: .ml-anomalies-get-influencers-test
4143
type: doc
@@ -55,6 +57,7 @@ setup:
5557
- do:
5658
headers:
5759
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
60+
Content-Type: application/json
5861
index:
5962
index: .ml-anomalies-get-influencers-test
6063
type: doc

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ setup:
5959
- do:
6060
headers:
6161
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
62+
Content-Type: application/json
6263
index:
6364
index: .ml-anomalies-shared
6465
type: doc
@@ -75,6 +76,7 @@ setup:
7576
- do:
7677
headers:
7778
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
79+
Content-Type: application/json
7880
index:
7981
index: .ml-anomalies-shared
8082
type: doc
@@ -91,6 +93,7 @@ setup:
9193
- do:
9294
headers:
9395
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
96+
Content-Type: application/json
9497
index:
9598
index: .ml-anomalies-shared
9699
type: doc
@@ -123,6 +126,7 @@ setup:
123126
- do:
124127
headers:
125128
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
129+
Content-Type: application/json
126130
index:
127131
index: .ml-anomalies-shared
128132
type: doc
@@ -139,6 +143,7 @@ setup:
139143
- do:
140144
headers:
141145
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
146+
Content-Type: application/json
142147
index:
143148
index: .ml-anomalies-shared
144149
type: doc
@@ -155,6 +160,7 @@ setup:
155160
- do:
156161
headers:
157162
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
163+
Content-Type: application/json
158164
index:
159165
index: .ml-anomalies-shared
160166
type: doc
@@ -171,6 +177,7 @@ setup:
171177
- do:
172178
headers:
173179
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
180+
Content-Type: application/json
174181
index:
175182
index: .ml-anomalies-shared
176183
type: doc
@@ -187,6 +194,7 @@ setup:
187194
- do:
188195
headers:
189196
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
197+
Content-Type: application/json
190198
index:
191199
index: .ml-anomalies-shared
192200
type: doc
@@ -203,6 +211,7 @@ setup:
203211
- do:
204212
headers:
205213
Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser
214+
Content-Type: application/json
206215
index:
207216
index: .ml-anomalies-shared
208217
type: doc

0 commit comments

Comments
 (0)