From dae0b5625d35c131b7e0cd9dba4dba82a15405e6 Mon Sep 17 00:00:00 2001 From: David Kyle Date: Mon, 12 Dec 2016 16:00:20 +0000 Subject: [PATCH] =?UTF-8?q?Add=20yaml=20tests=20assert=20a=20404=20is=20re?= =?UTF-8?q?turned=20when=20the=20job=20id=20isn=E2=80=99t=20recognised=20(?= =?UTF-8?q?elastic/elasticsearch#531)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For open, close, _flush and posting data Original commit: elastic/x-pack-elasticsearch@be2c29c409f6e8beffc0b3bd457c7790b84c0e9e --- .../rest-api-spec/test/post_data.yaml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/post_data.yaml b/elasticsearch/src/test/resources/rest-api-spec/test/post_data.yaml index b7f27001d43..a6483bc67b0 100644 --- a/elasticsearch/src/test/resources/rest-api-spec/test/post_data.yaml +++ b/elasticsearch/src/test/resources/rest-api-spec/test/post_data.yaml @@ -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