From 547ab849b4765b496f7d9c4baadef1dd3aa0119d Mon Sep 17 00:00:00 2001 From: Dan Hermann Date: Thu, 2 Apr 2020 15:04:03 -0500 Subject: [PATCH] Test to enforce response to invalid data stream names (#54663) --- .../test/indices.data_stream/10_basic.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.data_stream/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.data_stream/10_basic.yml index 2861c443bfa..44e8fdf7200 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.data_stream/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.data_stream/10_basic.yml @@ -31,3 +31,19 @@ indices.delete_data_stream: name: simple-data-stream2 - is_true: acknowledged + +--- +"Create data stream with invalid name": + - skip: + version: " - 7.7.99" + reason: available only in 7.8+ + + - do: + catch: bad_request + indices.create_data_stream: + name: invalid-data-stream#-name + body: + timestamp_field: "@timestamp" + + - match: { status: 400 } + - match: { error.root_cause.0.type: "illegal_argument_exception" }