Add yaml tests assert a 404 is returned when the job id isn’t recognised (elastic/elasticsearch#531)

For open, close, _flush and posting data

Original commit: elastic/x-pack-elasticsearch@be2c29c409
This commit is contained in:
David Kyle 2016-12-12 16:00:20 +00:00 committed by GitHub
parent 300d7c67d2
commit dae0b5625d
1 changed files with 23 additions and 0 deletions

View File

@ -73,6 +73,12 @@ setup:
---
"Test POST data with invalid parameters":
- do:
catch: missing
xpack.prelert.job_data:
job_id: not_a_job
body: {}
- do:
catch: /parse_exception/
xpack.prelert.job_data:
@ -93,6 +99,11 @@ setup:
---
"Test Flush data with invalid parameters":
- do:
catch: missing
xpack.prelert.flush_job:
job_id: not_a_job
- do:
catch: /parse_exception/
xpack.prelert.flush_job:
@ -110,3 +121,15 @@ setup:
xpack.prelert.flush_job:
job_id: farequote
advance_time: advance_time_not_a_date
---
"Test open and close with non-existent job id":
- do:
catch: missing
xpack.prelert.open_job:
job_id: not_a_job
- do:
catch: missing
xpack.prelert.close_job:
job_id: not_a_job