Update rest-api-spec to use bad_request (elastic/x-pack-elasticsearch#2507)
ref #elastic/elasticsearch#26539 Original commit: elastic/x-pack-elasticsearch@8b79a0769a
This commit is contained in:
parent
df1e4e85a4
commit
fa0b854fb6
|
@ -97,7 +97,7 @@ teardown:
|
|||
"Should fail gracefully when body content is not provided":
|
||||
|
||||
- do:
|
||||
catch: request
|
||||
catch: bad_request
|
||||
xpack.license.post:
|
||||
acknowledge: true
|
||||
|
||||
|
|
|
@ -180,7 +180,7 @@ setup:
|
|||
"Test delete with in-use model":
|
||||
|
||||
- do:
|
||||
catch: request
|
||||
catch: bad_request
|
||||
xpack.ml.delete_model_snapshot:
|
||||
job_id: "delete-model-snapshot"
|
||||
snapshot_id: "active-snapshot"
|
||||
|
|
|
@ -89,19 +89,19 @@ setup:
|
|||
"Test invalid param combinations":
|
||||
|
||||
- do:
|
||||
catch: request
|
||||
catch: bad_request
|
||||
xpack.ml.get_filters:
|
||||
filter_id: "filter-foo"
|
||||
from: 0
|
||||
|
||||
- do:
|
||||
catch: request
|
||||
catch: bad_request
|
||||
xpack.ml.get_filters:
|
||||
filter_id: "filter-foo"
|
||||
size: 1
|
||||
|
||||
- do:
|
||||
catch: request
|
||||
catch: bad_request
|
||||
xpack.ml.get_filters:
|
||||
filter_id: "filter-foo"
|
||||
from: 0
|
||||
|
|
|
@ -348,7 +348,7 @@
|
|||
}
|
||||
|
||||
- do:
|
||||
catch: request
|
||||
catch: bad_request
|
||||
xpack.ml.update_job:
|
||||
job_id: _all
|
||||
body: >
|
||||
|
|
|
@ -173,35 +173,35 @@ setup:
|
|||
---
|
||||
"Test mutually-exclusive params":
|
||||
- do:
|
||||
catch: request
|
||||
catch: bad_request
|
||||
xpack.ml.get_buckets:
|
||||
job_id: "jobs-get-result-buckets"
|
||||
timestamp: "2016-06-01T00:00:00Z"
|
||||
start: "2016-05-01T00:00:00Z"
|
||||
|
||||
- do:
|
||||
catch: request
|
||||
catch: bad_request
|
||||
xpack.ml.get_buckets:
|
||||
job_id: "jobs-get-result-buckets"
|
||||
timestamp: "2016-06-01T00:00:00Z"
|
||||
end: "2016-05-01T00:00:00Z"
|
||||
|
||||
- do:
|
||||
catch: request
|
||||
catch: bad_request
|
||||
xpack.ml.get_buckets:
|
||||
job_id: "jobs-get-result-buckets"
|
||||
timestamp: "2016-06-01T00:00:00Z"
|
||||
from: "2016-05-01T00:00:00Z"
|
||||
|
||||
- do:
|
||||
catch: request
|
||||
catch: bad_request
|
||||
xpack.ml.get_buckets:
|
||||
job_id: "jobs-get-result-buckets"
|
||||
timestamp: "2016-06-01T00:00:00Z"
|
||||
end: "2016-05-01T00:00:00Z"
|
||||
|
||||
- do:
|
||||
catch: request
|
||||
catch: bad_request
|
||||
xpack.ml.get_buckets:
|
||||
job_id: "jobs-get-result-buckets"
|
||||
timestamp: "2016-06-01T00:00:00Z"
|
||||
|
@ -210,7 +210,7 @@ setup:
|
|||
---
|
||||
"Test mutually-exclusive params via body":
|
||||
- do:
|
||||
catch: request
|
||||
catch: bad_request
|
||||
xpack.ml.get_buckets:
|
||||
job_id: "jobs-get-result-buckets"
|
||||
body:
|
||||
|
@ -218,7 +218,7 @@ setup:
|
|||
start: "2016-05-01T00:00:00Z"
|
||||
|
||||
- do:
|
||||
catch: request
|
||||
catch: bad_request
|
||||
xpack.ml.get_buckets:
|
||||
job_id: "jobs-get-result-buckets"
|
||||
body:
|
||||
|
@ -226,7 +226,7 @@ setup:
|
|||
end: "2016-05-01T00:00:00Z"
|
||||
|
||||
- do:
|
||||
catch: request
|
||||
catch: bad_request
|
||||
xpack.ml.get_buckets:
|
||||
job_id: "jobs-get-result-buckets"
|
||||
body:
|
||||
|
@ -234,7 +234,7 @@ setup:
|
|||
from: "2016-05-01T00:00:00Z"
|
||||
|
||||
- do:
|
||||
catch: request
|
||||
catch: bad_request
|
||||
xpack.ml.get_buckets:
|
||||
job_id: "jobs-get-result-buckets"
|
||||
body:
|
||||
|
@ -242,7 +242,7 @@ setup:
|
|||
end: "2016-05-01T00:00:00Z"
|
||||
|
||||
- do:
|
||||
catch: request
|
||||
catch: bad_request
|
||||
xpack.ml.get_buckets:
|
||||
job_id: "jobs-get-result-buckets"
|
||||
body:
|
||||
|
|
|
@ -118,21 +118,21 @@ setup:
|
|||
---
|
||||
"Test with invalid param combinations":
|
||||
- do:
|
||||
catch: request
|
||||
catch: bad_request
|
||||
xpack.ml.get_categories:
|
||||
job_id: "jobs-get-result-categories"
|
||||
category_id: 1
|
||||
from: 0
|
||||
|
||||
- do:
|
||||
catch: request
|
||||
catch: bad_request
|
||||
xpack.ml.get_categories:
|
||||
job_id: "jobs-get-result-categories"
|
||||
category_id: 1
|
||||
size: 1
|
||||
|
||||
- do:
|
||||
catch: request
|
||||
catch: bad_request
|
||||
xpack.ml.get_categories:
|
||||
job_id: "jobs-get-result-categories"
|
||||
category_id: 1
|
||||
|
@ -142,7 +142,7 @@ setup:
|
|||
---
|
||||
"Test with invalid param combinations via body":
|
||||
- do:
|
||||
catch: request
|
||||
catch: bad_request
|
||||
xpack.ml.get_categories:
|
||||
job_id: "jobs-get-result-categories"
|
||||
category_id: 1
|
||||
|
@ -150,7 +150,7 @@ setup:
|
|||
from: 0
|
||||
|
||||
- do:
|
||||
catch: request
|
||||
catch: bad_request
|
||||
xpack.ml.get_categories:
|
||||
job_id: "jobs-get-result-categories"
|
||||
category_id: 1
|
||||
|
@ -158,7 +158,7 @@ setup:
|
|||
size: 1
|
||||
|
||||
- do:
|
||||
catch: request
|
||||
catch: bad_request
|
||||
xpack.ml.get_categories:
|
||||
job_id: "jobs-get-result-categories"
|
||||
category_id: 1
|
||||
|
|
|
@ -125,7 +125,7 @@
|
|||
|
||||
# Missing a system_id causes it to fail
|
||||
- do:
|
||||
catch: request
|
||||
catch: bad_request
|
||||
xpack.monitoring.bulk:
|
||||
system_api_version: "6"
|
||||
interval: "10s"
|
||||
|
@ -136,7 +136,7 @@
|
|||
|
||||
# Missing a system_api_version causes it to fail
|
||||
- do:
|
||||
catch: request
|
||||
catch: bad_request
|
||||
xpack.monitoring.bulk:
|
||||
system_id: "kibana"
|
||||
interval: "10s"
|
||||
|
@ -147,7 +147,7 @@
|
|||
|
||||
# Missing an interval causes it to fail
|
||||
- do:
|
||||
catch: request
|
||||
catch: bad_request
|
||||
xpack.monitoring.bulk:
|
||||
system_id: "kibana"
|
||||
system_api_version: "6"
|
||||
|
|
|
@ -86,7 +86,7 @@ teardown:
|
|||
---
|
||||
"Test put user with different username in body":
|
||||
- do:
|
||||
catch: request
|
||||
catch: bad_request
|
||||
xpack.security.put_user:
|
||||
username: "joe"
|
||||
body: >
|
||||
|
|
|
@ -23,7 +23,7 @@ teardown:
|
|||
---
|
||||
"Test creating a user without password":
|
||||
- do:
|
||||
catch: request
|
||||
catch: bad_request
|
||||
xpack.security.put_user:
|
||||
username: "no_password_user"
|
||||
body: >
|
||||
|
|
Loading…
Reference in New Issue