From a0f826c8ed9bc108cde6ae2c9feb48f458266fde Mon Sep 17 00:00:00 2001 From: Luca Cavanna Date: Mon, 23 May 2016 10:01:03 +0200 Subject: [PATCH] fix xpack.usage api name and add a basic REST test for it (elastic/elasticsearch#2308) There were two api with same name, depending on the platform one or the other was being loaded first, hence the xpack info tests may fail due to unsupported params being used. Original commit: elastic/x-pack-elasticsearch@bd44eef3cc7cc16b9800e31659de3736e483b76c --- .../resources/rest-api-spec/api/xpack.info.json | 2 +- .../resources/rest-api-spec/api/xpack.usage.json | 2 +- .../rest-api-spec/test/xpack/15_basic.yaml | 15 +++++++++++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/elasticsearch/x-pack/src/test/resources/rest-api-spec/api/xpack.info.json b/elasticsearch/x-pack/src/test/resources/rest-api-spec/api/xpack.info.json index 206cbf40a0a..e3d71ab64bc 100644 --- a/elasticsearch/x-pack/src/test/resources/rest-api-spec/api/xpack.info.json +++ b/elasticsearch/x-pack/src/test/resources/rest-api-spec/api/xpack.info.json @@ -1,6 +1,6 @@ { "xpack.info": { - "documentation": "Retrieve information about xpack, including buid number/timestamp and license status", + "documentation": "Retrieve information about xpack, including build number/timestamp and license status", "methods": [ "GET" ], "url": { "path": "/_xpack", diff --git a/elasticsearch/x-pack/src/test/resources/rest-api-spec/api/xpack.usage.json b/elasticsearch/x-pack/src/test/resources/rest-api-spec/api/xpack.usage.json index 35e24a0c5f2..f66f3afad99 100644 --- a/elasticsearch/x-pack/src/test/resources/rest-api-spec/api/xpack.usage.json +++ b/elasticsearch/x-pack/src/test/resources/rest-api-spec/api/xpack.usage.json @@ -1,5 +1,5 @@ { - "xpack.info": { + "xpack.usage": { "documentation": "Retrieve information about xpack features usage", "methods": [ "GET" ], "url": { diff --git a/elasticsearch/x-pack/src/test/resources/rest-api-spec/test/xpack/15_basic.yaml b/elasticsearch/x-pack/src/test/resources/rest-api-spec/test/xpack/15_basic.yaml index 140de33fb33..515670ce7f2 100644 --- a/elasticsearch/x-pack/src/test/resources/rest-api-spec/test/xpack/15_basic.yaml +++ b/elasticsearch/x-pack/src/test/resources/rest-api-spec/test/xpack/15_basic.yaml @@ -1,6 +1,6 @@ -# Integration tests xpack info API +# Integration tests xpack info and usage API # -"X-Pack Info": +"X-Pack Info and Usage": - do: cluster.health: @@ -83,6 +83,17 @@ - is_true: features.monitoring.description - is_true: tagline + - do: + xpack.usage: {} + - is_true: watcher.enabled + - is_true: watcher.available + - is_true: security.enabled + - is_true: security.available + - is_true: graph.enabled + - is_true: graph.available + - is_true: monitoring.enabled + - is_true: monitoring.available + - do: xpack.info: categories: "_none"