disable content-type randomization for some ml tests

post_data and get_model seem to support json only

Original commit: elastic/x-pack-elasticsearch@683f998228
This commit is contained in:
javanna 2017-02-23 22:02:19 +01:00 committed by Luca Cavanna
parent 33ccc3bd6c
commit 39ccc67a7b
5 changed files with 67 additions and 0 deletions

View File

@ -1,4 +1,7 @@
setup:
- skip:
features: ["headers"]
- do:
xpack.ml.put_job:
job_id: foo
@ -26,6 +29,9 @@ setup:
job_id: foo
- do:
#set the header so we won't randomize it
headers:
Content-Type: application/json
index:
index: .ml-anomalies-foo
type: model_snapshot
@ -62,6 +68,9 @@ setup:
}
- do:
#set the header so we won't randomize it
headers:
Content-Type: application/json
index:
index: .ml-anomalies-foo
type: model_snapshot

View File

@ -1,4 +1,7 @@
setup:
- skip:
features: ["headers"]
- do:
indices.create:
index: .ml-anomalies-foo
@ -10,6 +13,9 @@ setup:
type: date
- do:
#set the header so we won't randomize it
headers:
Content-Type: application/json
index:
index: .ml-anomalies-foo
type: model_snapshot
@ -17,6 +23,9 @@ setup:
body: { "job_id": "foo", "snapshot_id": "1", "timestamp": "2016-06-02T00:00:00Z" }
- do:
#set the header so we won't randomize it
headers:
Content-Type: application/json
index:
index: .ml-anomalies-foo
type: model_snapshot

View File

@ -54,8 +54,13 @@ setup:
---
"Test get job stats after uploading data prompting the creation of some stats":
- skip:
features: ["headers"]
- do:
#set the header so we won't randomize it
headers:
Content-Type: application/json
xpack.ml.post_data:
job_id: job-stats-test
body: >
@ -83,8 +88,13 @@ setup:
---
"Test get job stats for closed job":
- skip:
features: ["headers"]
- do:
#set the header so we won't randomize it
headers:
Content-Type: application/json
xpack.ml.post_data:
job_id: job-stats-test
body: >

View File

@ -38,7 +38,13 @@ setup:
---
"Test POST data job api, flush, close and verify DataCounts doc":
- skip:
features: ["headers"]
- do:
#set the header so we won't randomize it
headers:
Content-Type: application/json
xpack.ml.post_data:
job_id: farequote
body: >
@ -105,13 +111,22 @@ setup:
---
"Test POST data with invalid parameters":
- skip:
features: ["headers"]
- do:
#set the header so we won't randomize it
headers:
Content-Type: application/json
catch: missing
xpack.ml.post_data:
job_id: not_a_job
body: {}
- do:
#set the header so we won't randomize it
headers:
Content-Type: application/json
catch: /parse_exception/
xpack.ml.post_data:
job_id: farequote
@ -121,6 +136,9 @@ setup:
{"airline":"JZA","responsetime":"990.4628","sourcetype":"farequote","time":"1403481600"}
- do:
#set the header so we won't randomize it
headers:
Content-Type: application/json
catch: /parse_exception/
xpack.ml.post_data:
job_id: farequote
@ -168,17 +186,29 @@ setup:
---
"Test flushing, posting and closing a closed job":
- skip:
features: ["headers"]
- do:
#set the header so we won't randomize it
headers:
Content-Type: application/json
catch: /status_exception/
xpack.ml.flush_job:
job_id: closed_job
- do:
#set the header so we won't randomize it
headers:
Content-Type: application/json
catch: /status_exception/
xpack.ml.close_job:
job_id: closed_job
- do:
#set the header so we won't randomize it
headers:
Content-Type: application/json
catch: /status_exception/
xpack.ml.post_data:
job_id: closed_job

View File

@ -1,4 +1,7 @@
setup:
- skip:
features: ["headers"]
- do:
indices.create:
index: .ml-anomalies-foo
@ -10,6 +13,9 @@ setup:
type: date
- do:
#set the header so we won't randomize it
headers:
Content-Type: application/json
index:
index: .ml-anomalies-foo
type: model_snapshot
@ -22,6 +28,9 @@ setup:
}
- do:
#set the header so we won't randomize it
headers:
Content-Type: application/json
index:
index: .ml-anomalies-foo
type: model_snapshot