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