From e8af4e2e8b82ede42865695d5bbfc455fa474543 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Mon, 18 Feb 2019 10:14:28 +0100 Subject: [PATCH] Fix #38623 remove xpack namespace REST API (#38625) * Fix #38623 remove xpack namespace REST API Except for xpack.usage and xpack.info API's, this moves the last remaining API's out of the xpack namespace * rename xpack api's inside inside the files as well * updated yaml tests references to xpack namespaces api's * update callsApi calls in the IT subclasses * make sure docs testing does not use xpack namespaced api's * fix leftover xpack namespaced method names in docs/build.gradle * found another leftover reference (cherry picked from commit ccb5d934363c37506b76119ac050a254fa80b5e7) --- docs/build.gradle | 24 ++++----- x-pack/docs/build.gradle | 34 ++++++------- .../smoketest/XDocsClientYamlTestSuiteIT.java | 4 +- .../smoketest/MlWithSecurityUserRoleIT.java | 6 +-- .../xpack/test/rest/XPackRestIT.java | 4 +- ....graph.explore.json => graph.explore.json} | 2 +- ...icense.delete.json => license.delete.json} | 2 +- ...pack.license.get.json => license.get.json} | 2 +- ...tus.json => license.get_basic_status.json} | 2 +- ...tus.json => license.get_trial_status.json} | 2 +- ...ck.license.post.json => license.post.json} | 2 +- ...sic.json => license.post_start_basic.json} | 2 +- ...ial.json => license.post_start_trial.json} | 2 +- ...tions.json => migration.deprecations.json} | 2 +- ...nce.json => migration.get_assistance.json} | 2 +- ...on.upgrade.json => migration.upgrade.json} | 2 +- ...delete_job.json => rollup.delete_job.json} | 2 +- ...lup.get_jobs.json => rollup.get_jobs.json} | 2 +- ..._caps.json => rollup.get_rollup_caps.json} | 2 +- ...json => rollup.get_rollup_index_caps.json} | 2 +- ...ollup.put_job.json => rollup.put_job.json} | 2 +- ..._search.json => rollup.rollup_search.json} | 2 +- ...p.start_job.json => rollup.start_job.json} | 2 +- ...lup.stop_job.json => rollup.stop_job.json} | 2 +- ...lear_cursor.json => sql.clear_cursor.json} | 2 +- .../{xpack.sql.query.json => sql.query.json} | 2 +- ....sql.translate.json => sql.translate.json} | 2 +- ....ack_watch.json => watcher.ack_watch.json} | 2 +- ...watch.json => watcher.activate_watch.json} | 2 +- ...tch.json => watcher.deactivate_watch.json} | 2 +- ...e_watch.json => watcher.delete_watch.json} | 2 +- ..._watch.json => watcher.execute_watch.json} | 2 +- ....get_watch.json => watcher.get_watch.json} | 2 +- ....put_watch.json => watcher.put_watch.json} | 2 +- ....watcher.start.json => watcher.start.json} | 2 +- ....watcher.stats.json => watcher.stats.json} | 2 +- ...ck.watcher.stop.json => watcher.stop.json} | 2 +- .../test/deprecation/10_basic.yml | 4 +- .../rest-api-spec/test/graph/10_basic.yml | 2 +- .../test/license/20_put_license.yml | 50 +++++++++---------- .../rest-api-spec/test/rollup/delete_job.yml | 22 ++++---- .../rest-api-spec/test/rollup/get_jobs.yml | 14 +++--- .../test/rollup/get_rollup_caps.yml | 14 +++--- .../test/rollup/get_rollup_index_caps.yml | 30 +++++------ .../rest-api-spec/test/rollup/put_job.yml | 16 +++--- .../test/rollup/rollup_search.yml | 40 +++++++-------- .../test/rollup/security_tests.yml | 12 ++--- .../rest-api-spec/test/rollup/start_job.yml | 8 +-- .../rest-api-spec/test/rollup/stop_job.yml | 20 ++++---- .../resources/rest-api-spec/test/sql/sql.yml | 14 +++--- .../rest-api-spec/test/sql/translate.yml | 2 +- .../rest-api-spec/test/upgrade/10_basic.yml | 8 +-- .../test/watcher/ack_watch/10_basic.yml | 8 +-- .../ack_watch/20_ack_individual_action.yml | 6 +-- .../30_reset_ack_after_unmet_condition.yml | 18 +++---- ...reset_ack_after_unmet_action_condition.yml | 18 +++---- .../test/watcher/activate_watch/10_basic.yml | 18 +++---- .../test/watcher/delete_watch/10_basic.yml | 8 +-- .../test/watcher/execute_watch/10_basic.yml | 14 +++--- .../watcher/execute_watch/20_transform.yml | 6 +-- .../watcher/execute_watch/30_throttled.yml | 12 ++--- .../execute_watch/40_ignore_condition.yml | 6 +-- .../watcher/execute_watch/50_action_mode.yml | 8 +-- .../watcher/execute_watch/60_http_input.yml | 2 +- .../test/watcher/execute_watch/70_invalid.yml | 8 +-- .../test/watcher/get_watch/10_basic.yml | 6 +-- .../test/watcher/get_watch/20_missing.yml | 6 +-- .../watcher/get_watch/30_with_chain_input.yml | 4 +- .../test/watcher/put_watch/10_basic.yml | 4 +- .../20_put_watch_with_throttle_period.yml | 6 +-- ..._put_watch_with_action_throttle_period.yml | 6 +-- .../put_watch/40_put_watch_as_inactive.yml | 6 +-- .../50_email_attachment_validation.yml | 4 +- .../60_put_watch_with_action_condition.yml | 6 +-- ...0_put_watch_with_index_action_using_id.yml | 26 +++++----- .../80_put_get_watch_with_passwords.yml | 16 +++--- ...watch_gets_overwritten_without_version.yml | 8 +-- .../put_watch/91_search_total_hits_as_int.yml | 4 +- .../test/watcher/start_watcher/10_basic.yml | 2 +- .../test/watcher/stats/10_basic.yml | 12 ++--- .../test/watcher/stop_watcher/10_basic.yml | 4 +- .../test/watcher/usage/10_basic.yml | 4 +- .../rest-api-spec/test/xpack/15_basic.yml | 6 +-- .../test/mixed_cluster/60_watcher.yml | 14 +++--- .../test/old_cluster/60_watcher.yml | 16 +++--- .../test/upgraded_cluster/60_watcher.yml | 14 +++--- ...cherWithSecurityClientYamlTestSuiteIT.java | 8 +-- .../10_insufficient_privs.yml | 4 +- .../20_test_run_as_execute_watch.yml | 40 +++++++-------- .../smoketest/WatcherRestIT.java | 8 +-- .../test/mustache/10_webhook.yml | 4 +- .../test/mustache/20_array_access.yml | 2 +- .../test/mustache/25_array_compare.yml | 2 +- .../test/mustache/30_search_input.yml | 10 ++-- .../test/mustache/40_search_transform.yml | 6 +-- .../test/mustache/50_webhook_url_escaping.yml | 6 +-- .../rest-api-spec/test/painless/10_basic.yml | 12 ++--- .../test/painless/20_minimal_body.yml | 4 +- .../test/painless/30_inline_watch.yml | 2 +- .../test/painless/40_exception.yml | 6 +-- .../test/painless/50_update_scripts.yml | 12 ++--- .../60_chain_input_with_transform.yml | 2 +- .../WatcherHipchatYamlTestSuiteIT.java | 8 +-- .../rest-api-spec/test/hipchat/10_hipchat.yml | 12 ++--- .../smoketest/WatcherJiraYamlTestSuiteIT.java | 8 +-- .../rest-api-spec/test/jira/10_jira.yml | 16 +++--- .../WatcherPagerDutyYamlTestSuiteIT.java | 8 +-- .../test/pagerduty/10_pagerduty.yml | 4 +- .../WatcherSlackYamlTestSuiteIT.java | 8 +-- .../rest-api-spec/test/slack/10_slack.yml | 4 +- 110 files changed, 447 insertions(+), 447 deletions(-) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.graph.explore.json => graph.explore.json} (97%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.license.delete.json => license.delete.json} (89%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.license.get.json => license.get.json} (94%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.license.get_basic_status.json => license.get_basic_status.json} (88%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.license.get_trial_status.json => license.get_trial_status.json} (88%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.license.post.json => license.post.json} (95%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.license.post_start_basic.json => license.post_start_basic.json} (92%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.license.post_start_trial.json => license.post_start_trial.json} (94%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.migration.deprecations.json => migration.deprecations.json} (92%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.migration.get_assistance.json => migration.get_assistance.json} (97%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.migration.upgrade.json => migration.upgrade.json} (95%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.rollup.delete_job.json => rollup.delete_job.json} (91%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.rollup.get_jobs.json => rollup.get_jobs.json} (93%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.rollup.get_rollup_caps.json => rollup.get_rollup_caps.json} (91%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.rollup.get_rollup_index_caps.json => rollup.get_rollup_index_caps.json} (89%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.rollup.put_job.json => rollup.put_job.json} (93%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.rollup.rollup_search.json => rollup.rollup_search.json} (97%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.rollup.start_job.json => rollup.start_job.json} (91%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.rollup.stop_job.json => rollup.stop_job.json} (96%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.sql.clear_cursor.json => sql.clear_cursor.json} (91%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.sql.query.json => sql.query.json} (95%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.sql.translate.json => sql.translate.json} (92%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.watcher.ack_watch.json => watcher.ack_watch.json} (95%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.watcher.activate_watch.json => watcher.activate_watch.json} (92%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.watcher.deactivate_watch.json => watcher.deactivate_watch.json} (92%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.watcher.delete_watch.json => watcher.delete_watch.json} (92%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.watcher.execute_watch.json => watcher.execute_watch.json} (95%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.watcher.get_watch.json => watcher.get_watch.json} (93%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.watcher.put_watch.json => watcher.put_watch.json} (97%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.watcher.start.json => watcher.start.json} (91%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.watcher.stats.json => watcher.stats.json} (97%) rename x-pack/plugin/src/test/resources/rest-api-spec/api/{xpack.watcher.stop.json => watcher.stop.json} (92%) diff --git a/docs/build.gradle b/docs/build.gradle index 1083d07b94f46..5b98a62d99640 100644 --- a/docs/build.gradle +++ b/docs/build.gradle @@ -840,7 +840,7 @@ buildRestTests.setups['sensor_prefab_data'] = ''' ''' buildRestTests.setups['sample_job'] = ''' - do: - xpack.ml.put_job: + ml.put_job: job_id: "sample_job" body: > { @@ -894,7 +894,7 @@ buildRestTests.setups['farequote_data'] = buildRestTests.setups['farequote_index ''' buildRestTests.setups['farequote_job'] = buildRestTests.setups['farequote_data'] + ''' - do: - xpack.ml.put_job: + ml.put_job: job_id: "farequote" body: > { @@ -914,7 +914,7 @@ buildRestTests.setups['farequote_job'] = buildRestTests.setups['farequote_data'] ''' buildRestTests.setups['farequote_datafeed'] = buildRestTests.setups['farequote_job'] + ''' - do: - xpack.ml.put_datafeed: + ml.put_datafeed: datafeed_id: "datafeed-farequote" body: > { @@ -978,7 +978,7 @@ buildRestTests.setups['server_metrics_data'] = buildRestTests.setups['server_met ''' buildRestTests.setups['server_metrics_job'] = buildRestTests.setups['server_metrics_data'] + ''' - do: - xpack.ml.put_job: + ml.put_job: job_id: "total-requests" body: > { @@ -1000,7 +1000,7 @@ buildRestTests.setups['server_metrics_job'] = buildRestTests.setups['server_metr ''' buildRestTests.setups['server_metrics_datafeed'] = buildRestTests.setups['server_metrics_job'] + ''' - do: - xpack.ml.put_datafeed: + ml.put_datafeed: datafeed_id: "datafeed-total-requests" body: > { @@ -1010,22 +1010,22 @@ buildRestTests.setups['server_metrics_datafeed'] = buildRestTests.setups['server ''' buildRestTests.setups['server_metrics_openjob'] = buildRestTests.setups['server_metrics_datafeed'] + ''' - do: - xpack.ml.open_job: + ml.open_job: job_id: "total-requests" ''' buildRestTests.setups['server_metrics_startdf'] = buildRestTests.setups['server_metrics_openjob'] + ''' - do: - xpack.ml.start_datafeed: + ml.start_datafeed: datafeed_id: "datafeed-total-requests" ''' buildRestTests.setups['calendar_outages'] = ''' - do: - xpack.ml.put_calendar: + ml.put_calendar: calendar_id: "planned-outages" ''' buildRestTests.setups['calendar_outages_addevent'] = buildRestTests.setups['calendar_outages'] + ''' - do: - xpack.ml.post_calendar_events: + ml.post_calendar_events: calendar_id: "planned-outages" body: > { "description": "event 1", "start_time": "2017-12-01T00:00:00Z", "end_time": "2017-12-02T00:00:00Z", "calendar_id": "planned-outages" } @@ -1034,12 +1034,12 @@ buildRestTests.setups['calendar_outages_addevent'] = buildRestTests.setups['cale ''' buildRestTests.setups['calendar_outages_openjob'] = buildRestTests.setups['server_metrics_openjob'] + ''' - do: - xpack.ml.put_calendar: + ml.put_calendar: calendar_id: "planned-outages" ''' buildRestTests.setups['calendar_outages_addjob'] = buildRestTests.setups['server_metrics_openjob'] + ''' - do: - xpack.ml.put_calendar: + ml.put_calendar: calendar_id: "planned-outages" body: > { @@ -1048,7 +1048,7 @@ buildRestTests.setups['calendar_outages_addjob'] = buildRestTests.setups['server ''' buildRestTests.setups['calendar_outages_addevent'] = buildRestTests.setups['calendar_outages_addjob'] + ''' - do: - xpack.ml.post_calendar_events: + ml.post_calendar_events: calendar_id: "planned-outages" body: > { "events" : [ diff --git a/x-pack/docs/build.gradle b/x-pack/docs/build.gradle index 518628e9fd0fb..f64f70459a1d1 100644 --- a/x-pack/docs/build.gradle +++ b/x-pack/docs/build.gradle @@ -97,7 +97,7 @@ buildRestTests.docs = fileTree(projectDir) { Map setups = buildRestTests.setups setups['my_inactive_watch'] = ''' - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" active: false body: > @@ -216,7 +216,7 @@ setups['library'] = ''' ''' setups['sample_job'] = ''' - do: - xpack.ml.put_job: + ml.put_job: job_id: "sample_job" body: > { @@ -270,7 +270,7 @@ setups['farequote_data'] = setups['farequote_index'] + ''' ''' setups['farequote_job'] = setups['farequote_data'] + ''' - do: - xpack.ml.put_job: + ml.put_job: job_id: "farequote" body: > { @@ -290,7 +290,7 @@ setups['farequote_job'] = setups['farequote_data'] + ''' ''' setups['farequote_datafeed'] = setups['farequote_job'] + ''' - do: - xpack.ml.put_datafeed: + ml.put_datafeed: datafeed_id: "datafeed-farequote" body: > { @@ -300,7 +300,7 @@ setups['farequote_datafeed'] = setups['farequote_job'] + ''' ''' setups['ml_filter_safe_domains'] = ''' - do: - xpack.ml.put_filter: + ml.put_filter: filter_id: "safe_domains" body: > { @@ -364,7 +364,7 @@ setups['server_metrics_data'] = setups['server_metrics_index'] + ''' ''' setups['server_metrics_job'] = setups['server_metrics_data'] + ''' - do: - xpack.ml.put_job: + ml.put_job: job_id: "total-requests" body: > { @@ -386,7 +386,7 @@ setups['server_metrics_job'] = setups['server_metrics_data'] + ''' ''' setups['server_metrics_datafeed'] = setups['server_metrics_job'] + ''' - do: - xpack.ml.put_datafeed: + ml.put_datafeed: datafeed_id: "datafeed-total-requests" body: > { @@ -396,22 +396,22 @@ setups['server_metrics_datafeed'] = setups['server_metrics_job'] + ''' ''' setups['server_metrics_openjob'] = setups['server_metrics_datafeed'] + ''' - do: - xpack.ml.open_job: + ml.open_job: job_id: "total-requests" ''' setups['server_metrics_startdf'] = setups['server_metrics_openjob'] + ''' - do: - xpack.ml.start_datafeed: + ml.start_datafeed: datafeed_id: "datafeed-total-requests" ''' setups['calendar_outages'] = ''' - do: - xpack.ml.put_calendar: + ml.put_calendar: calendar_id: "planned-outages" ''' setups['calendar_outages_addevent'] = setups['calendar_outages'] + ''' - do: - xpack.ml.post_calendar_events: + ml.post_calendar_events: calendar_id: "planned-outages" body: > { "description": "event 1", "start_time": "2017-12-01T00:00:00Z", "end_time": "2017-12-02T00:00:00Z", "calendar_id": "planned-outages" } @@ -420,12 +420,12 @@ setups['calendar_outages_addevent'] = setups['calendar_outages'] + ''' ''' setups['calendar_outages_openjob'] = setups['server_metrics_openjob'] + ''' - do: - xpack.ml.put_calendar: + ml.put_calendar: calendar_id: "planned-outages" ''' setups['calendar_outages_addjob'] = setups['server_metrics_openjob'] + ''' - do: - xpack.ml.put_calendar: + ml.put_calendar: calendar_id: "planned-outages" body: > { @@ -434,7 +434,7 @@ setups['calendar_outages_addjob'] = setups['server_metrics_openjob'] + ''' ''' setups['calendar_outages_addevent'] = setups['calendar_outages_addjob'] + ''' - do: - xpack.ml.post_calendar_events: + ml.post_calendar_events: calendar_id: "planned-outages" body: > { "events" : [ @@ -473,7 +473,7 @@ setups['sensor_rollup_job'] = ''' node: type: keyword - do: - xpack.rollup.put_job: + rollup.put_job: id: "sensor" body: > { @@ -541,7 +541,7 @@ setups['sensor_started_rollup_job'] = ''' {"timestamp": 1516297294000, "temperature": 202, "voltage": 4.0, "node": "c"} - do: - xpack.rollup.put_job: + rollup.put_job: id: "sensor" body: > { @@ -571,7 +571,7 @@ setups['sensor_started_rollup_job'] = ''' ] } - do: - xpack.rollup.start_job: + rollup.start_job: id: "sensor" ''' diff --git a/x-pack/docs/src/test/java/org/elasticsearch/smoketest/XDocsClientYamlTestSuiteIT.java b/x-pack/docs/src/test/java/org/elasticsearch/smoketest/XDocsClientYamlTestSuiteIT.java index e57f57174a883..ba3516d4f2e8d 100644 --- a/x-pack/docs/src/test/java/org/elasticsearch/smoketest/XDocsClientYamlTestSuiteIT.java +++ b/x-pack/docs/src/test/java/org/elasticsearch/smoketest/XDocsClientYamlTestSuiteIT.java @@ -79,13 +79,13 @@ public void reenableWatcher() throws Exception { if (isWatcherTest()) { assertBusy(() -> { ClientYamlTestResponse response = - getAdminExecutionContext().callApi("xpack.watcher.stats", emptyMap(), emptyList(), emptyMap()); + getAdminExecutionContext().callApi("watcher.stats", emptyMap(), emptyList(), emptyMap()); String state = (String) response.evaluate("stats.0.watcher_state"); switch (state) { case "stopped": ClientYamlTestResponse startResponse = - getAdminExecutionContext().callApi("xpack.watcher.start", emptyMap(), emptyList(), emptyMap()); + getAdminExecutionContext().callApi("watcher.start", emptyMap(), emptyList(), emptyMap()); boolean isAcknowledged = (boolean) startResponse.evaluate("acknowledged"); assertThat(isAcknowledged, is(true)); throw new AssertionError("waiting until stopped state reached started state"); diff --git a/x-pack/plugin/ml/qa/ml-with-security/src/test/java/org/elasticsearch/smoketest/MlWithSecurityUserRoleIT.java b/x-pack/plugin/ml/qa/ml-with-security/src/test/java/org/elasticsearch/smoketest/MlWithSecurityUserRoleIT.java index 9e31ddb131c6f..67b72a648db60 100644 --- a/x-pack/plugin/ml/qa/ml-with-security/src/test/java/org/elasticsearch/smoketest/MlWithSecurityUserRoleIT.java +++ b/x-pack/plugin/ml/qa/ml-with-security/src/test/java/org/elasticsearch/smoketest/MlWithSecurityUserRoleIT.java @@ -35,9 +35,9 @@ public void test() throws IOException { // role for (ExecutableSection section : testCandidate.getTestSection().getExecutableSections()) { if (section instanceof DoSection) { - if (((DoSection) section).getApiCallSection().getApi().startsWith("xpack.ml.") && - ((DoSection) section).getApiCallSection().getApi().startsWith("xpack.ml.get_") == false && - ((DoSection) section).getApiCallSection().getApi().equals("xpack.ml.find_file_structure") == false) { + if (((DoSection) section).getApiCallSection().getApi().startsWith("ml.") && + ((DoSection) section).getApiCallSection().getApi().startsWith("ml.get_") == false && + ((DoSection) section).getApiCallSection().getApi().equals("ml.find_file_structure") == false) { fail("should have failed because of missing role"); } } diff --git a/x-pack/plugin/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestIT.java b/x-pack/plugin/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestIT.java index 336ddadea4c32..ba63034c170d0 100644 --- a/x-pack/plugin/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestIT.java +++ b/x-pack/plugin/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestIT.java @@ -105,13 +105,13 @@ private void waitForWatcher() throws Exception { if (isWatcherTest()) { assertBusy(() -> { ClientYamlTestResponse response = - getAdminExecutionContext().callApi("xpack.watcher.stats", emptyMap(), emptyList(), emptyMap()); + getAdminExecutionContext().callApi("watcher.stats", emptyMap(), emptyList(), emptyMap()); String state = (String) response.evaluate("stats.0.watcher_state"); switch (state) { case "stopped": ClientYamlTestResponse startResponse = - getAdminExecutionContext().callApi("xpack.watcher.start", emptyMap(), emptyList(), emptyMap()); + getAdminExecutionContext().callApi("watcher.start", emptyMap(), emptyList(), emptyMap()); boolean isAcknowledged = (boolean) startResponse.evaluate("acknowledged"); assertThat(isAcknowledged, is(true)); throw new AssertionError("waiting until stopped state reached started state"); diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.graph.explore.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/graph.explore.json similarity index 97% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.graph.explore.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/graph.explore.json index a092ffb1582eb..293694d0ae8a0 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.graph.explore.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/graph.explore.json @@ -1,5 +1,5 @@ { - "xpack.graph.explore": { + "graph.explore": { "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html", "methods": ["GET", "POST"], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.license.delete.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/license.delete.json similarity index 89% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.license.delete.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/license.delete.json index 72229bafdbe04..315b283699b62 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.license.delete.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/license.delete.json @@ -1,5 +1,5 @@ { - "xpack.license.delete": { + "license.delete": { "documentation": "https://www.elastic.co/guide/en/x-pack/current/license-management.html", "methods": ["DELETE"], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.license.get.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/license.get.json similarity index 94% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.license.get.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/license.get.json index aa425d3b12d8e..0de1fb48536e8 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.license.get.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/license.get.json @@ -1,5 +1,5 @@ { - "xpack.license.get": { + "license.get": { "documentation": "https://www.elastic.co/guide/en/x-pack/current/license-management.html", "methods": ["GET"], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.license.get_basic_status.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/license.get_basic_status.json similarity index 88% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.license.get_basic_status.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/license.get_basic_status.json index d5ae7be328718..e9823b449087e 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.license.get_basic_status.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/license.get_basic_status.json @@ -1,5 +1,5 @@ { - "xpack.license.get_basic_status": { + "license.get_basic_status": { "documentation": "https://www.elastic.co/guide/en/x-pack/current/license-management.html", "methods": ["GET"], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.license.get_trial_status.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/license.get_trial_status.json similarity index 88% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.license.get_trial_status.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/license.get_trial_status.json index dd867ae6e79a5..54f6b0a8c7d43 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.license.get_trial_status.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/license.get_trial_status.json @@ -1,5 +1,5 @@ { - "xpack.license.get_trial_status": { + "license.get_trial_status": { "documentation": "https://www.elastic.co/guide/en/x-pack/current/license-management.html", "methods": ["GET"], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.license.post.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/license.post.json similarity index 95% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.license.post.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/license.post.json index 5c58f55004217..23d597a3c1964 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.license.post.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/license.post.json @@ -1,5 +1,5 @@ { - "xpack.license.post": { + "license.post": { "documentation": "https://www.elastic.co/guide/en/x-pack/current/license-management.html", "methods": ["PUT", "POST"], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.license.post_start_basic.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/license.post_start_basic.json similarity index 92% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.license.post_start_basic.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/license.post_start_basic.json index 4b4610973f9bc..2b9da7d47c685 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.license.post_start_basic.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/license.post_start_basic.json @@ -1,5 +1,5 @@ { - "xpack.license.post_start_basic": { + "license.post_start_basic": { "documentation": "https://www.elastic.co/guide/en/x-pack/current/license-management.html", "methods": ["POST"], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.license.post_start_trial.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/license.post_start_trial.json similarity index 94% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.license.post_start_trial.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/license.post_start_trial.json index 8c8b19b0506ba..d0e3afcbb1e1f 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.license.post_start_trial.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/license.post_start_trial.json @@ -1,5 +1,5 @@ { - "xpack.license.post_start_trial": { + "license.post_start_trial": { "documentation": "https://www.elastic.co/guide/en/x-pack/current/license-management.html", "methods": ["POST"], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.migration.deprecations.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/migration.deprecations.json similarity index 92% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.migration.deprecations.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/migration.deprecations.json index 9ca2d5fd75ad2..989b206919ba9 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.migration.deprecations.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/migration.deprecations.json @@ -1,5 +1,5 @@ { - "xpack.migration.deprecations": { + "migration.deprecations": { "documentation": "http://www.elastic.co/guide/en/migration/current/migration-api-deprecation.html", "methods": [ "GET" ], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.migration.get_assistance.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/migration.get_assistance.json similarity index 97% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.migration.get_assistance.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/migration.get_assistance.json index cfa7d949efed4..b4f89205ecb8b 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.migration.get_assistance.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/migration.get_assistance.json @@ -1,5 +1,5 @@ { - "xpack.migration.get_assistance": { + "migration.get_assistance": { "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-assistance.html", "methods": [ "GET" ], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.migration.upgrade.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/migration.upgrade.json similarity index 95% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.migration.upgrade.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/migration.upgrade.json index d134b27d257a9..e5150e8d10196 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.migration.upgrade.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/migration.upgrade.json @@ -1,5 +1,5 @@ { - "xpack.migration.upgrade": { + "migration.upgrade": { "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-upgrade.html", "methods": [ "POST" ], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.delete_job.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.delete_job.json similarity index 91% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.delete_job.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.delete_job.json index 8046667f889e1..e03cd2ae977b9 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.delete_job.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.delete_job.json @@ -1,5 +1,5 @@ { - "xpack.rollup.delete_job": { + "rollup.delete_job": { "documentation": "", "methods": [ "DELETE" ], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.get_jobs.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.get_jobs.json similarity index 93% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.get_jobs.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.get_jobs.json index fc2f49f8415e8..aa5d56e590910 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.get_jobs.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.get_jobs.json @@ -1,5 +1,5 @@ { - "xpack.rollup.get_jobs": { + "rollup.get_jobs": { "documentation": "", "methods": [ "GET" ], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.get_rollup_caps.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.get_rollup_caps.json similarity index 91% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.get_rollup_caps.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.get_rollup_caps.json index f21bdf26bbf09..0fd8aa3168222 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.get_rollup_caps.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.get_rollup_caps.json @@ -1,5 +1,5 @@ { - "xpack.rollup.get_rollup_caps": { + "rollup.get_rollup_caps": { "documentation": "", "methods": [ "GET" ], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.get_rollup_index_caps.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.get_rollup_index_caps.json similarity index 89% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.get_rollup_index_caps.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.get_rollup_index_caps.json index f2db0e93dce77..c446f29e7591b 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.get_rollup_index_caps.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.get_rollup_index_caps.json @@ -1,5 +1,5 @@ { - "xpack.rollup.get_rollup_index_caps": { + "rollup.get_rollup_index_caps": { "documentation": "", "methods": [ "GET" ], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.put_job.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.put_job.json similarity index 93% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.put_job.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.put_job.json index 5b5d59b1dd3c3..ca33affd7d8a6 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.put_job.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.put_job.json @@ -1,5 +1,5 @@ { - "xpack.rollup.put_job": { + "rollup.put_job": { "documentation": "", "methods": [ "PUT" ], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.rollup_search.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.rollup_search.json similarity index 97% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.rollup_search.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.rollup_search.json index 0858e3260f822..826f97aa15a03 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.rollup_search.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.rollup_search.json @@ -1,5 +1,5 @@ { - "xpack.rollup.rollup_search": { + "rollup.rollup_search": { "documentation": "", "methods": [ "GET", "POST" ], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.start_job.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.start_job.json similarity index 91% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.start_job.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.start_job.json index 6fad8ef9c35c5..8ee505b195b22 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.start_job.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.start_job.json @@ -1,5 +1,5 @@ { - "xpack.rollup.start_job": { + "rollup.start_job": { "documentation": "", "methods": [ "POST" ], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.stop_job.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.stop_job.json similarity index 96% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.stop_job.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.stop_job.json index b42087208e202..152b72945800d 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.rollup.stop_job.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/rollup.stop_job.json @@ -1,5 +1,5 @@ { - "xpack.rollup.stop_job": { + "rollup.stop_job": { "documentation": "", "methods": [ "POST" ], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.sql.clear_cursor.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/sql.clear_cursor.json similarity index 91% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.sql.clear_cursor.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/sql.clear_cursor.json index 2d2ce3519b239..ec84f9543bfe0 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.sql.clear_cursor.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/sql.clear_cursor.json @@ -1,5 +1,5 @@ { - "xpack.sql.clear_cursor": { + "sql.clear_cursor": { "documentation": "Clear SQL cursor", "methods": [ "POST"], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.sql.query.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/sql.query.json similarity index 95% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.sql.query.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/sql.query.json index b95aa509772fd..c12a876e8cd32 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.sql.query.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/sql.query.json @@ -1,5 +1,5 @@ { - "xpack.sql.query": { + "sql.query": { "documentation": "Execute SQL", "methods": [ "POST", "GET" ], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.sql.translate.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/sql.translate.json similarity index 92% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.sql.translate.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/sql.translate.json index 29a522ceb31c7..2200a61be66b2 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.sql.translate.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/sql.translate.json @@ -1,5 +1,5 @@ { - "xpack.sql.translate": { + "sql.translate": { "documentation": "Translate SQL into Elasticsearch queries", "methods": [ "POST", "GET" ], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.ack_watch.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.ack_watch.json similarity index 95% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.ack_watch.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.ack_watch.json index 5f1ed7f860f97..4920c986a042f 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.ack_watch.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.ack_watch.json @@ -1,5 +1,5 @@ { - "xpack.watcher.ack_watch": { + "watcher.ack_watch": { "documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html", "methods": [ "PUT", "POST" ], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.activate_watch.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.activate_watch.json similarity index 92% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.activate_watch.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.activate_watch.json index 12c38ce1bebf8..49fb169dede77 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.activate_watch.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.activate_watch.json @@ -1,5 +1,5 @@ { - "xpack.watcher.activate_watch": { + "watcher.activate_watch": { "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html", "methods": [ "PUT", "POST" ], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.deactivate_watch.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.deactivate_watch.json similarity index 92% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.deactivate_watch.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.deactivate_watch.json index d9cb9d653bc01..ddc68b439395e 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.deactivate_watch.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.deactivate_watch.json @@ -1,5 +1,5 @@ { - "xpack.watcher.deactivate_watch": { + "watcher.deactivate_watch": { "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html", "methods": [ "PUT", "POST" ], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.delete_watch.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.delete_watch.json similarity index 92% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.delete_watch.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.delete_watch.json index a243315c91a62..cdf61ad52023f 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.delete_watch.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.delete_watch.json @@ -1,5 +1,5 @@ { - "xpack.watcher.delete_watch": { + "watcher.delete_watch": { "documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html", "methods": [ "DELETE" ], diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.execute_watch.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.execute_watch.json similarity index 95% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.execute_watch.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.execute_watch.json index 0456eef5f49ab..6db8f3ae115f5 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.execute_watch.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.execute_watch.json @@ -1,5 +1,5 @@ { - "xpack.watcher.execute_watch": { + "watcher.execute_watch": { "documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html", "methods": [ "PUT", "POST" ], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.get_watch.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.get_watch.json similarity index 93% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.get_watch.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.get_watch.json index b0587301ec425..81f21b4b0c1e5 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.get_watch.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.get_watch.json @@ -1,5 +1,5 @@ { - "xpack.watcher.get_watch": { + "watcher.get_watch": { "documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html", "methods": [ "GET" ], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.put_watch.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.put_watch.json similarity index 97% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.put_watch.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.put_watch.json index 438f2e4ee7637..24f020a7b90b4 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.put_watch.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.put_watch.json @@ -1,5 +1,5 @@ { - "xpack.watcher.put_watch": { + "watcher.put_watch": { "documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html", "methods": [ "PUT", "POST" ], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.start.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.start.json similarity index 91% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.start.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.start.json index eceb2a8628517..649b21c7db3f1 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.start.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.start.json @@ -1,5 +1,5 @@ { - "xpack.watcher.start": { + "watcher.start": { "documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html", "methods": [ "POST" ], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.stats.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.stats.json similarity index 97% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.stats.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.stats.json index 13857f1791019..1fe6eaed3d9a8 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.stats.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.stats.json @@ -1,5 +1,5 @@ { - "xpack.watcher.stats": { + "watcher.stats": { "documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html", "methods": [ "GET" ], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.stop.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.stop.json similarity index 92% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.stop.json rename to x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.stop.json index 1a14947b4fb11..4deee79436e2d 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.stop.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/watcher.stop.json @@ -1,5 +1,5 @@ { - "xpack.watcher.stop": { + "watcher.stop": { "documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html", "methods": [ "POST" ], "url": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/deprecation/10_basic.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/deprecation/10_basic.yml index 1cbb310bb4a08..99e6cdc72faf8 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/deprecation/10_basic.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/deprecation/10_basic.yml @@ -7,7 +7,7 @@ setup: --- "Test Deprecations": - do: - xpack.migration.deprecations: + migration.deprecations: index: "*" - length: { cluster_settings: 0 } - length: { node_settings: 0 } @@ -54,7 +54,7 @@ setup: - do: warnings: - Deprecated field [use_dis_max] used, replaced by [Set [tie_breaker] to 1 instead] - xpack.migration.deprecations: + migration.deprecations: index: "*" - length: { ml_settings: 1 } - match: { ml_settings.0.level : warning } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/graph/10_basic.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/graph/10_basic.yml index ccd861e6358e0..c7aa714032f92 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/graph/10_basic.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/graph/10_basic.yml @@ -39,7 +39,7 @@ setup: wait_for_status: green - do: - xpack.graph.explore: + graph.explore: index: test_1 body: {"query": {"match": {"keys": 1}},"controls":{"use_significance":false},"vertices":[{"field": "keys","min_doc_count": 1}]} - length: {failures: 0} diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/license/20_put_license.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/license/20_put_license.yml index 6f5b1bd740a92..0a3b2bc135b57 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/license/20_put_license.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/license/20_put_license.yml @@ -1,7 +1,7 @@ --- teardown: - do: - xpack.license.post: + license.post: acknowledge: true body: | {"licenses":[{"uid":"3aa62ffe-36e1-4fad-bfdc-9dff8301eb22","type":"trial","issue_date_in_millis":1523456691721,"expiry_date_in_millis":1838816691721,"max_nodes":5,"issued_to":"customer","issuer":"elasticsearch","signature":"AAAABAAAAA2kWNcuc+DT0lrlmYZKAAAAIAo5/x6hrsGh1GqqrJmy4qgmEC7gK0U4zQ6q5ZEMhm4jAAABAEn6fG9y2VxKBu2T3D5hffh56kzOQODCOdhr0y2d17ZSIJMZRqO7ZywPCWNS1aR33GhfIHkTER0ysML0xMH/gXavhyRvMBndJj0UBKzuwpTawSlnxYtcqN8mSBIvJC7Ki+uJ1SpAILC2ZP9fnkRlqwXqBlTwfYn7xnZgu9DKrOWru/ipTPObo7jcePl8VTK6nWFen7/hCFDQTUFZ0jQvd+nq7A1PAcHGNxGfdbMVmAXCXgGWkRfT3clo9/vadgo+isNyh1sPq9mN7gwsvBAKtA1FrpH2EXYYbfOsSpBvUmhYMgErLg1k3/CbS0pCWLKOaX1xTMayosdZOjagU3auZXY=","start_date_in_millis":-1}]} @@ -10,7 +10,7 @@ teardown: ## current license version - do: - xpack.license.post: + license.post: acknowledge: true body: | {"licenses":[{"uid":"894371dc-9t49-4997-93cb-8o2e3r7fa6a8","type":"trial","issue_date_in_millis":1411948800000,"expiry_date_in_millis":1916956799999,"max_nodes":1,"issued_to":"issuedTo","issuer":"issuer","signature":"AAAAAgAAAA0FWh0T9njItjQ2qammAAABmC9ZN0hjZDBGYnVyRXpCOW5Bb3FjZDAxOWpSbTVoMVZwUzRxVk1PSmkxakxZdW5IMlhlTHNoN1N2MXMvRFk4d3JTZEx3R3RRZ0pzU3lobWJKZnQvSEFva0ppTHBkWkprZWZSQi9iNmRQNkw1SlpLN0lDalZCS095MXRGN1lIZlpYcVVTTnFrcTE2dzhJZmZrdFQrN3JQeGwxb0U0MXZ0dDJHSERiZTVLOHNzSDByWnpoZEphZHBEZjUrTVBxRENNSXNsWWJjZllaODdzVmEzUjNiWktNWGM5TUhQV2plaUo4Q1JOUml4MXNuL0pSOEhQaVB2azhmUk9QVzhFeTFoM1Q0RnJXSG53MWk2K055c28zSmRnVkF1b2JSQkFLV2VXUmVHNDZ2R3o2VE1qbVNQS2lxOHN5bUErZlNIWkZSVmZIWEtaSU9wTTJENDVvT1NCYklacUYyK2FwRW9xa0t6dldMbmMzSGtQc3FWOTgzZ3ZUcXMvQkt2RUZwMFJnZzlvL2d2bDRWUzh6UG5pdENGWFRreXNKNkE9PQAAAQBZhvozA0trrxhUZ1QbaTsKTna9C5KVQ6pv8yg1pnsBpZXCl8kX1SrgoFn1bXq61IvJwfw5qnmYNiH3hRhTO9EyaCBqaLk8NXZQ6TrRkQSpEnnBwAYUkZeKXsIuBoOk4B4mzwC/r8aMAkzrTiEBtBbog+57cSaU9y37Gkdd+1jXCQrxP+jOEUf7gnXWZvE6oeRroLvCt1fYn09k0CF8kKTbrPTSjC6igZR3uvTHyee74XQ9PRavvHax73T4UOEdQZX/P1ibSQIWKbBRD5YQ1POYVjTayoltTnWLMxfEcAkkATJZLhpBEHST7kZWjrTS6J1dCReJc7a8Vsj/78HXvOIy"}]} @@ -18,14 +18,14 @@ teardown: - match: { license_status: "valid" } - do: - xpack.license.get: {} + license.get: {} ## a license object has 11 attributes - length: { license: 11 } ## bwc for licenses format - do: - xpack.license.post: + license.post: acknowledge: true body: | {"licenses":[{"uid":"893361dc-9749-4997-93cb-802e3d7fa4a8","type":"gold","issue_date_in_millis":1411948800000,"expiry_date_in_millis":1914278399999,"max_nodes":1,"issued_to":"issued_to","issuer":"issuer","signature":"AAAAAwAAAA2T3vqdBBetKQaBgxipAAABmC9ZN0hjZDBGYnVyRXpCOW5Bb3FjZDAxOWpSbTVoMVZwUzRxVk1PSmkxakxZdW5IMlhlTHNoN1N2MXMvRFk4d3JTZEx3R3RRZ0pzU3lobWJKZnQvSEFva0ppTHBkWkprZWZSQi9iNmRQNkw1SlpLN0lDalZCS095MXRGN1lIZlpYcVVTTnFrcTE2dzhJZmZrdFQrN3JQeGwxb0U0MXZ0dDJHSERiZTVLOHNzSDByWnpoZEphZHBEZjUrTVBxRENNSXNsWWJjZllaODdzVmEzUjNiWktNWGM5TUhQV2plaUo4Q1JOUml4MXNuL0pSOEhQaVB2azhmUk9QVzhFeTFoM1Q0RnJXSG53MWk2K055c28zSmRnVkF1b2JSQkFLV2VXUmVHNDZ2R3o2VE1qbVNQS2lxOHN5bUErZlNIWkZSVmZIWEtaSU9wTTJENDVvT1NCYklacUYyK2FwRW9xa0t6dldMbmMzSGtQc3FWOTgzZ3ZUcXMvQkt2RUZwMFJnZzlvL2d2bDRWUzh6UG5pdENGWFRreXNKNkE9PQAAAQB7pGFYgawfLm9zzT80LvcLHjy1t/v2uSzCQWKdXXhrwSy4WrAH2uK/+PEiQ7aEpW5erLsyJ5KLA6OEZJDaP7r+mjOPuLt0++l5j4DMn7ybMzOPHXWBc6LETE3+pp0GZPyOmwsDkZSRUegTtciR2R6z+mdnGrhOYM80y08KVWwhdU/DHw41MK7ePo6tq73Nz49y9lDgt9fxA0t4ggEBPbnTDDBVQ25AjauY8sa0M5eg9rDDRayw1KamYWrara8PIGX+2YjhtUeQhmlCPdlxc9wECJ7/knPss5bI3ZoXQR3fyXhjcXNnHEIsblqLrMCal3pLxs7lI+KPYMa2ZYL/am4P"}]} @@ -33,13 +33,13 @@ teardown: - match: { license_status: "valid" } - do: - xpack.license.get: {} + license.get: {} - length: { license: 11 } ## license version: 1.x - do: - xpack.license.post: + license.post: acknowledge: true body: | {"licenses":[{"uid":"893361dc-9749-4997-93cb-802e3d7fa4a8","type":"subscription","subscription_type":"gold","issue_date_in_millis":1411948800000,"feature":"shield","expiry_date_in_millis":1914278399999,"max_nodes":1,"issued_to":"issuedTo","issuer":"issuer","signature":"AAAAAQAAAA0LVAywwpSH94cyXr4zAAABmC9ZN0hjZDBGYnVyRXpCOW5Bb3FjZDAxOWpSbTVoMVZwUzRxVk1PSmkxakxZdW5IMlhlTHNoN1N2MXMvRFk4d3JTZEx3R3RRZ0pzU3lobWJKZnQvSEFva0ppTHBkWkprZWZSQi9iNmRQNkw1SlpLN0lDalZCS095MXRGN1lIZlpYcVVTTnFrcTE2dzhJZmZrdFQrN3JQeGwxb0U0MXZ0dDJHSERiZTVLOHNzSDByWnpoZEphZHBEZjUrTVBxRENNSXNsWWJjZllaODdzVmEzUjNiWktNWGM5TUhQV2plaUo4Q1JOUml4MXNuL0pSOEhQaVB2azhmUk9QVzhFeTFoM1Q0RnJXSG53MWk2K055c28zSmRnVkF1b2JSQkFLV2VXUmVHNDZ2R3o2VE1qbVNQS2lxOHN5bUErZlNIWkZSVmZIWEtaSU9wTTJENDVvT1NCYklacUYyK2FwRW9xa0t6dldMbmMzSGtQc3FWOTgzZ3ZUcXMvQkt2RUZwMFJnZzlvL2d2bDRWUzh6UG5pdENGWFRreXNKNkE9PQAAAQA4qscc/URRZVdFoLwgy9dqybYEQLW8YLkiAyPV5XHHHdtk+dtZIepiNEDkUXhSX2waVJlsNRF8/4kqplDfwNoD2TUM8fTgiIfiSiZYGDTGST+yW/5eAveEU5J5v1liBN27bwkqL+V4YAa0Tcm7NKKwjScWKAHiTU3vF8chPkGfCHE0kQgVwPC9RE82pTw0s6/uR4PfLGNFfqPM0uiE5nucfVrtj89JQiO/KA/7ZyFbo7VTNXxZQt7T7rZWBCP9KIjptXzcWuk08Q5S+rSoJNYbFo3HGKtrCVsRz/55rceNtdwKKXu1IwnSeir4I1/KLduQTtFLy0+1th87VS8T88UT"}]} @@ -47,13 +47,13 @@ teardown: - match: { license_status: "valid" } - do: - xpack.license.get: {} + license.get: {} - length: { license: 11 } ## multiple licenses version: 1.x - do: - xpack.license.post: + license.post: acknowledge: true body: | {"licenses":[{"uid":"893361dc-9749-4997-93cb-802e3d7fa4a8","type":"internal","subscription_type":"none","issue_date_in_millis":1411948800000,"feature":"shield","expiry_date_in_millis":1440892799999,"max_nodes":1,"issued_to":"issuedTo","issuer":"issuer","signature":"AAAAAQAAAA04Q4ky3rFyyWLFkytEAAABmC9ZN0hjZDBGYnVyRXpCOW5Bb3FjZDAxOWpSbTVoMVZwUzRxVk1PSmkxakxZdW5IMlhlTHNoN1N2MXMvRFk4d3JTZEx3R3RRZ0pzU3lobWJKZnQvSEFva0ppTHBkWkprZWZSQi9iNmRQNkw1SlpLN0lDalZCS095MXRGN1lIZlpYcVVTTnFrcTE2dzhJZmZrdFQrN3JQeGwxb0U0MXZ0dDJHSERiZTVLOHNzSDByWnpoZEphZHBEZjUrTVBxRENNSXNsWWJjZllaODdzVmEzUjNiWktNWGM5TUhQV2plaUo4Q1JOUml4MXNuL0pSOEhQaVB2azhmUk9QVzhFeTFoM1Q0RnJXSG53MWk2K055c28zSmRnVkF1b2JSQkFLV2VXUmVHNDZ2R3o2VE1qbVNQS2lxOHN5bUErZlNIWkZSVmZIWEtaSU9wTTJENDVvT1NCYklacUYyK2FwRW9xa0t6dldMbmMzSGtQc3FWOTgzZ3ZUcXMvQkt2RUZwMFJnZzlvL2d2bDRWUzh6UG5pdENGWFRreXNKNkE9PQAAAQBxMvUMn4h2E4R4TQMijahTxQj4LPQO4f1M79UxX/XkDlGcH+J5pRHx08OtTRPsFL1lED+h+PIXx307Vo+PNDsOxrWvoYZeYBkOLAO3ny9vhQga+52jYhMxIuFrT9xbcSCSNpMhGojgOIPU2WgiopVdVcimo1+Gk8VtklPB1wPwFzfOjOnPgp/Icx3WYpfkeAUUOyWUYiFIBAe4bnz84iF+xwLKbgYk6aHF25ECBtdb/Uruhcm9+jEFpoIEUtCouvvk9C+NJZ4OickV4xpRgaRG2x9PONH8ZN0QGhGYhJGbisoCxuDmlLsyVxqxfMu3n/r7/jdsEJScjAlSrsLDOu6H"},{"uid":"893361dc-9749-4997-93cb-802e3dofh7aa","type":"internal","subscription_type":"none","issue_date_in_millis":1443484800000,"feature":"watcher","expiry_date_in_millis":1914278399999,"max_nodes":1,"issued_to":"issuedTo","issuer":"issuer","signature":"AAAAAQAAAA0Sc90guRIaQEmgLvMnAAABmC9ZN0hjZDBGYnVyRXpCOW5Bb3FjZDAxOWpSbTVoMVZwUzRxVk1PSmkxakxZdW5IMlhlTHNoN1N2MXMvRFk4d3JTZEx3R3RRZ0pzU3lobWJKZnQvSEFva0ppTHBkWkprZWZSQi9iNmRQNkw1SlpLN0lDalZCS095MXRGN1lIZlpYcVVTTnFrcTE2dzhJZmZrdFQrN3JQeGwxb0U0MXZ0dDJHSERiZTVLOHNzSDByWnpoZEphZHBEZjUrTVBxRENNSXNsWWJjZllaODdzVmEzUjNiWktNWGM5TUhQV2plaUo4Q1JOUml4MXNuL0pSOEhQaVB2azhmUk9QVzhFeTFoM1Q0RnJXSG53MWk2K055c28zSmRnVkF1b2JSQkFLV2VXUmVHNDZ2R3o2VE1qbVNQS2lxOHN5bUErZlNIWkZSVmZIWEtaSU9wTTJENDVvT1NCYklacUYyK2FwRW9xa0t6dldMbmMzSGtQc3FWOTgzZ3ZUcXMvQkt2RUZwMFJnZzlvL2d2bDRWUzh6UG5pdENGWFRreXNKNkE9PQAAAQCQ94dju0pnDZR3Uuypi0ic3aQJ+nvVqe+U8u79Dga5n1qIjcHDh7HvIBJEkF+tnVPlo/PXV/x7BZSwVY1PVErit+6rYix1yuHEgqwxmx/VdRICjCaZM6tk0Ob4dZCPv6Ebn2Mmk89KHC/PwiLPqF6QfwV/Pkpa8k2A3ORJmvYSDvXhe6tCs8dqc4ebrsFxqrZjwWh5CZSpzqqZBFXlngDv2N0hHhpGlueRszD0JJ5dfEL5ZA1DDOrgO9OJVejSHyRqe1L5QRUNdXPVfS+EAG0Dd1cNdJ/sMpYCPnVjbw6iq2/YgM3cuztsXVBY7ij4WnoP3ce7Zjs9TwHn+IqzftC6"}]} @@ -61,19 +61,19 @@ teardown: - match: { license_status: "valid" } - do: - xpack.license.get: {} + license.get: {} - length: { license: 11 } - match: { license.uid: "893361dc-9749-4997-93cb-802e3dofh7aa" } --- "Should throw 404 after license deletion": - do: - xpack.license.delete: {} + license.delete: {} - match: { acknowledged: true } - do: - xpack.license.get: {} + license.get: {} catch: missing --- @@ -81,7 +81,7 @@ teardown: # VERSION_NO_FEATURE_TYPE license version - do: - xpack.license.post: + license.post: acknowledge: true body: | {"license": {"uid":"893361dc-9749-4997-93cb-802e3d7fa4a8","type":"gold","issue_date_in_millis":1411948800000,"expiry_date_in_millis":1914278399999,"max_nodes":1,"issued_to":"issued_to","issuer":"issuer","signature":"AAAAAgAAAA3U8+YmnvwC+CWsV/mRAAABmC9ZN0hjZDBGYnVyRXpCOW5Bb3FjZDAxOWpSbTVoMVZwUzRxVk1PSmkxakxZdW5IMlhlTHNoN1N2MXMvRFk4d3JTZEx3R3RRZ0pzU3lobWJKZnQvSEFva0ppTHBkWkprZWZSQi9iNmRQNkw1SlpLN0lDalZCS095MXRGN1lIZlpYcVVTTnFrcTE2dzhJZmZrdFQrN3JQeGwxb0U0MXZ0dDJHSERiZTVLOHNzSDByWnpoZEphZHBEZjUrTVBxRENNSXNsWWJjZllaODdzVmEzUjNiWktNWGM5TUhQV2plaUo4Q1JOUml4MXNuL0pSOEhQaVB2azhmUk9QVzhFeTFoM1Q0RnJXSG53MWk2K055c28zSmRnVkF1b2JSQkFLV2VXUmVHNDZ2R3o2VE1qbVNQS2lxOHN5bUErZlNIWkZSVmZIWEtaSU9wTTJENDVvT1NCYklacUYyK2FwRW9xa0t6dldMbmMzSGtQc3FWOTgzZ3ZUcXMvQkt2RUZwMFJnZzlvL2d2bDRWUzh6UG5pdENGWFRreXNKNkE9PQAAAQBe8GfzDm6T537Iuuvjetb3xK5dvg0K5NQapv+rczWcQFxgCuzbF8plkgetP1aAGZP4uRESDQPMlOCsx4d0UqqAm9f7GbBQ3l93P+PogInPFeEH9NvOmaAQovmxVM9SE6DsDqlX4cXSO+bgWpXPTd2LmpoQc1fXd6BZ8GeuyYpVHVKp9hVU0tAYjw6HzYOE7+zuO1oJYOxElqy66AnIfkvHrvni+flym3tE7tDTgsDRaz7W3iBhaqiSntEqabEkvHdPHQdSR99XGaEvnHO1paK01/35iZF6OXHsF7CCj+558GRXiVxzueOe7TsGSSt8g7YjZwV9bRCyU7oB4B/nidgI"}} @@ -89,7 +89,7 @@ teardown: - match: { license_status: "valid" } - do: - xpack.license.get: {} + license.get: {} - length: { license: 11 } --- @@ -97,7 +97,7 @@ teardown: - do: catch: bad_request - xpack.license.post: + license.post: acknowledge: true body: | {"license":{"uid":"893361dc-9749-4997-93cb-802e3d7fa4a8","type":"basic","issue_date_in_millis":1411948800000,"expiry_date_in_millis":1914278399999,"max_nodes":1,"issued_to":"issuedTo","issuer":"issuer","signature":"AAAAAgAAAA0lKPZ0a7aZquUltho/AAABmC9ZN0hjZDBGYnVyRXpCOW5Bb3FjZDAxOWpSbTVoMVZwUzRxVk1PSmkxakxZdW5IMlhlTHNoN1N2MXMvRFk4d3JTZEx3R3RRZ0pzU3lobWJKZnQvSEFva0ppTHBkWkprZWZSQi9iNmRQNkw1SlpLN0lDalZCS095MXRGN1lIZlpYcVVTTnFrcTE2dzhJZmZrdFQrN3JQeGwxb0U0MXZ0dDJHSERiZTVLOHNzSDByWnpoZEphZHBEZjUrTVBxRENNSXNsWWJjZllaODdzVmEzUjNiWktNWGM5TUhQV2plaUo4Q1JOUml4MXNuL0pSOEhQaVB2azhmUk9QVzhFeTFoM1Q0RnJXSG53MWk2K055c28zSmRnVkF1b2JSQkFLV2VXUmVHNDZ2R3o2VE1qbVNQS2lxOHN5bUErZlNIWkZSVmZIWEtaSU9wTTJENDVvT1NCYklacUYyK2FwRW9xa0t6dldMbmMzSGtQc3FWOTgzZ3ZUcXMvQkt2RUZwMFJnZzlvL2d2bDRWUzh6UG5pdENGWFRreXNKNkE9PQAAAQAALuQ44S3IG6SzolcXVJ6Z4CIXORDrYQ+wdLCeey0XdujTslAOj+k+vNgo6wauc7Uswi01esHu4lb5IgpvKy7RRCbh5bj/z2ubu2qMJqopp9BQyD7VQjVfqmG6seUMJwJ1a5Avvm9r41YPSPcrii3bKK2e1l6jK6N8ibCvnTyY/XkYGCJrBWTSJePDbg6ErbyodrZ37x1StLbPWcNAkmweyHjDJnvYnbeZZO7A3NmubXZjW7Ttf8/YwQyE00PqMcl7fVPY3hkKpAeHf8aaJbqkKYbqZuER3EWJX7ZvLVb1dNdNg8aXRn7YrkQcYwWgptYQpfV+D7yEJ4j5muAEoler"}} @@ -108,7 +108,7 @@ teardown: - do: catch: bad_request - xpack.license.post: + license.post: acknowledge: true - match: { error.root_cause.0.reason: 'The license must be provided in the request body' } @@ -116,24 +116,24 @@ teardown: "Current license is trial means not eligle to start trial": - do: - xpack.license.get_trial_status: {} + license.get_trial_status: {} - match: { eligible_to_start_trial: false } - do: - xpack.license.post_start_basic: + license.post_start_basic: acknowledge: true - match: { basic_was_started: true } - do: - xpack.license.get_trial_status: {} + license.get_trial_status: {} - match: { eligible_to_start_trial: false } - do: catch: forbidden - xpack.license.post_start_trial: + license.post_start_trial: acknowledge: true - match: { trial_was_started: false } @@ -142,31 +142,31 @@ teardown: "Trial license cannot be basic": - do: catch: bad_request - xpack.license.post_start_trial: + license.post_start_trial: type: "basic" acknowledge: true --- "Can start basic license if do not already have basic": - do: - xpack.license.get_basic_status: {} + license.get_basic_status: {} - match: { eligible_to_start_basic: true } - do: - xpack.license.post_start_basic: + license.post_start_basic: acknowledge: true - match: { basic_was_started: true } - match: { acknowledged: true } - do: - xpack.license.get_basic_status: {} + license.get_basic_status: {} - match: { eligible_to_start_basic: false } - do: catch: forbidden - xpack.license.post_start_basic: {} + license.post_start_basic: {} - match: { basic_was_started: false } - match: { acknowledged: true } @@ -174,7 +174,7 @@ teardown: --- "Must acknowledge to start basic": - do: - xpack.license.post_start_basic: {} + license.post_start_basic: {} - match: { basic_was_started: false } - match: { acknowledged: false } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/delete_job.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/delete_job.yml index 40fa404f36147..1710e51c32bdc 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/delete_job.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/delete_job.yml @@ -15,7 +15,7 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: foo body: > { @@ -41,7 +41,7 @@ setup: "Test basic delete_job": - do: - xpack.rollup.get_jobs: + rollup.get_jobs: id: foo - match: @@ -80,12 +80,12 @@ setup: upgraded_doc_id: true - do: - xpack.rollup.delete_job: + rollup.delete_job: id: foo - is_true: acknowledged - do: - xpack.rollup.get_jobs: + rollup.get_jobs: id: foo - match: jobs: [] @@ -94,7 +94,7 @@ setup: "Test delete job twice": - do: - xpack.rollup.get_jobs: + rollup.get_jobs: id: foo - match: @@ -133,12 +133,12 @@ setup: upgraded_doc_id: true - do: - xpack.rollup.delete_job: + rollup.delete_job: id: foo - is_true: acknowledged - do: - xpack.rollup.get_jobs: + rollup.get_jobs: id: foo - match: jobs: [] @@ -147,7 +147,7 @@ setup: "Test delete running job": - do: - xpack.rollup.get_jobs: + rollup.get_jobs: id: foo - match: @@ -186,13 +186,13 @@ setup: upgraded_doc_id: true - do: - xpack.rollup.start_job: + rollup.start_job: id: foo - is_true: started - do: catch: request - xpack.rollup.delete_job: + rollup.delete_job: id: foo - is_false: acknowledged - match: { task_failures.0.reason.type: "illegal_state_exception" } @@ -205,5 +205,5 @@ setup: catch: /the task with id \[does_not_exist\] doesn't exist/ headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.delete_job: + rollup.delete_job: id: does_not_exist diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/get_jobs.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/get_jobs.yml index 6332302e67418..cd00a6f717b02 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/get_jobs.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/get_jobs.yml @@ -18,7 +18,7 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: foo body: > { @@ -42,7 +42,7 @@ setup: - is_true: acknowledged - do: - xpack.rollup.get_jobs: + rollup.get_jobs: id: foo - match: @@ -83,7 +83,7 @@ setup: "Test get with no jobs": - do: - xpack.rollup.get_jobs: + rollup.get_jobs: id: "_all" - length: { jobs: 0 } @@ -92,7 +92,7 @@ setup: "Test get missing job": - do: - xpack.rollup.get_jobs: + rollup.get_jobs: id: foo - match: @@ -108,7 +108,7 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: foo body: > { @@ -134,7 +134,7 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: bar body: > { @@ -158,7 +158,7 @@ setup: - is_true: acknowledged - do: - xpack.rollup.get_jobs: + rollup.get_jobs: id: "_all" - length: { jobs: 2 } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/get_rollup_caps.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/get_rollup_caps.yml index 0b5a8a2e11180..3d38f4a371234 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/get_rollup_caps.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/get_rollup_caps.yml @@ -36,7 +36,7 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: foo body: > { @@ -62,7 +62,7 @@ setup: "Verify one job caps": - do: - xpack.rollup.get_rollup_caps: + rollup.get_rollup_caps: id: "foo" - match: @@ -87,7 +87,7 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: foo2 body: > { @@ -109,7 +109,7 @@ setup: ] } - do: - xpack.rollup.get_rollup_caps: + rollup.get_rollup_caps: id: "foo" - match: @@ -146,7 +146,7 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: foo2 body: > { @@ -171,7 +171,7 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: foo3 body: > { @@ -194,7 +194,7 @@ setup: } - do: - xpack.rollup.get_rollup_caps: + rollup.get_rollup_caps: id: "_all" - match: diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/get_rollup_index_caps.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/get_rollup_index_caps.yml index b300af5e0a014..e4b98b9492087 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/get_rollup_index_caps.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/get_rollup_index_caps.yml @@ -36,7 +36,7 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: foo body: > { @@ -62,7 +62,7 @@ setup: "Verify one job caps by rollup index": - do: - xpack.rollup.get_rollup_index_caps: + rollup.get_rollup_index_caps: index: "foo_rollup" - match: @@ -87,7 +87,7 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: foo2 body: > { @@ -109,7 +109,7 @@ setup: ] } - do: - xpack.rollup.get_rollup_index_caps: + rollup.get_rollup_index_caps: index: "foo_rollup" - match: @@ -147,7 +147,7 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: foo2 body: > { @@ -169,7 +169,7 @@ setup: ] } - do: - xpack.rollup.get_rollup_index_caps: + rollup.get_rollup_index_caps: index: "foo_rollup" - match: @@ -194,7 +194,7 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: foo2 body: > { @@ -218,7 +218,7 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: foo3 body: > { @@ -241,7 +241,7 @@ setup: } - do: - xpack.rollup.get_rollup_index_caps: + rollup.get_rollup_index_caps: index: "_all" - match: @@ -297,7 +297,7 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: foo2 body: > { @@ -321,7 +321,7 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: foo3 body: > { @@ -344,7 +344,7 @@ setup: } - do: - xpack.rollup.get_rollup_index_caps: + rollup.get_rollup_index_caps: index: "foo_rollup2,foo_rollup" - match: @@ -396,7 +396,7 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: foo2 body: > { @@ -420,7 +420,7 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: foo3 body: > { @@ -443,7 +443,7 @@ setup: } - do: - xpack.rollup.get_rollup_index_caps: + rollup.get_rollup_index_caps: index: "*_rollup2" - match: diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/put_job.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/put_job.yml index f8cfe85cc2e6a..7983778108bd0 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/put_job.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/put_job.yml @@ -18,7 +18,7 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: foo body: > { @@ -42,7 +42,7 @@ setup: - is_true: acknowledged - do: - xpack.rollup.get_jobs: + rollup.get_jobs: id: foo - match: @@ -86,7 +86,7 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: foo body: > { @@ -113,7 +113,7 @@ setup: catch: /Cannot create rollup job \[foo\] because job was previously created \(existing metadata\)/ headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: foo body: > { @@ -144,7 +144,7 @@ setup: catch: /foo/ headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: foo body: > { @@ -174,7 +174,7 @@ setup: catch: /unknown field \[headers\], parser not found/ headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: foo body: > { @@ -206,7 +206,7 @@ setup: catch: /Could not find a \[numeric\] or \[date\] field with name \[field_doesnt_exist\] in any of the indices matching the index pattern/ headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: foo body: > { @@ -235,7 +235,7 @@ setup: catch: /Unsupported metric \[does_not_exist\]/ headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: foo body: > { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/rollup_search.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/rollup_search.yml index 9af896f4c9fab..a7765dfc15fe3 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/rollup_search.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/rollup_search.yml @@ -17,7 +17,7 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: foo body: > { @@ -127,7 +127,7 @@ setup: "Basic Search": - do: - xpack.rollup.rollup_search: + rollup.rollup_search: index: "foo_rollup" body: size: 0 @@ -152,7 +152,7 @@ setup: "Formatted Date Histo": - do: - xpack.rollup.rollup_search: + rollup.rollup_search: index: "foo_rollup" body: size: 0 @@ -178,7 +178,7 @@ setup: "Empty aggregation": - do: - xpack.rollup.rollup_search: + rollup.rollup_search: rest_total_hits_as_int: true index: "foo_rollup" body: @@ -193,7 +193,7 @@ setup: "Empty aggregation with new response format": - do: - xpack.rollup.rollup_search: + rollup.rollup_search: index: "foo_rollup" body: size: 0 @@ -210,7 +210,7 @@ setup: "Search with Metric": - do: - xpack.rollup.rollup_search: + rollup.rollup_search: index: "foo_rollup" body: size: 0 @@ -243,7 +243,7 @@ setup: "Search with Query": - do: - xpack.rollup.rollup_search: + rollup.rollup_search: index: "foo_rollup" body: size: 0 @@ -280,7 +280,7 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: foo2 body: > { @@ -388,7 +388,7 @@ setup: - do: - xpack.rollup.rollup_search: + rollup.rollup_search: index: "foo_rollup" body: size: 0 @@ -423,7 +423,7 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: foo2 body: > { @@ -531,7 +531,7 @@ setup: - do: - xpack.rollup.rollup_search: + rollup.rollup_search: index: "foo_rollup" body: size: 0 @@ -568,7 +568,7 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: foo2 body: > { @@ -675,7 +675,7 @@ setup: "_rollup.version": 1 - do: - xpack.rollup.rollup_search: + rollup.rollup_search: index: "foo_rollup" body: size: 0 @@ -710,7 +710,7 @@ setup: "Wildcards matching single rollup index": - do: - xpack.rollup.rollup_search: + rollup.rollup_search: index: "foo_rollup*" body: size: 0 @@ -750,7 +750,7 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: bar body: > { @@ -777,7 +777,7 @@ setup: - do: catch: /RollupSearch currently only supports searching one rollup index at a time\./ - xpack.rollup.rollup_search: + rollup.rollup_search: index: "*_rollup" body: size: 0 @@ -798,7 +798,7 @@ setup: name: rollup_alias - do: - xpack.rollup.rollup_search: + rollup.rollup_search: index: "rollup_alias" body: size: 0 @@ -838,7 +838,7 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: bar body: > { @@ -870,7 +870,7 @@ setup: - do: catch: /RollupSearch currently only supports searching one rollup index at a time\./ - xpack.rollup.rollup_search: + rollup.rollup_search: index: "rollup_alias" body: size: 0 @@ -886,7 +886,7 @@ setup: "Search with typed_keys": - do: - xpack.rollup.rollup_search: + rollup.rollup_search: index: "foo_rollup" typed_keys: true body: diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/security_tests.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/security_tests.yml index 5a53847187484..07f4e2b62a6f9 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/security_tests.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/security_tests.yml @@ -89,7 +89,7 @@ teardown: # This index pattern will match both indices, but we only have permission to read one - do: headers: { Authorization: "Basic dGVzdF91c2VyOngtcGFjay10ZXN0LXBhc3N3b3Jk" } # test_user - xpack.rollup.put_job: + rollup.put_job: id: foo body: > { @@ -115,7 +115,7 @@ teardown: - do: headers: { Authorization: "Basic dGVzdF91c2VyOngtcGFjay10ZXN0LXBhc3N3b3Jk" } # test_user - xpack.rollup.start_job: + rollup.start_job: id: foo - is_true: started @@ -135,7 +135,7 @@ teardown: - do: headers: { Authorization: "Basic dGVzdF91c2VyOngtcGFjay10ZXN0LXBhc3N3b3Jk" } # test_user - xpack.rollup.get_jobs: + rollup.get_jobs: id: foo - match: jobs.0.stats.documents_processed: 1 @@ -250,7 +250,7 @@ teardown: # Index contains two docs, but we should only be able to see one of them - do: headers: { Authorization: "Basic dGVzdF91c2VyOngtcGFjay10ZXN0LXBhc3N3b3Jk" } # test_user - xpack.rollup.put_job: + rollup.put_job: id: foo body: > { @@ -275,7 +275,7 @@ teardown: - do: headers: { Authorization: "Basic dGVzdF91c2VyOngtcGFjay10ZXN0LXBhc3N3b3Jk" } # test_user - xpack.rollup.start_job: + rollup.start_job: id: foo - is_true: started @@ -295,7 +295,7 @@ teardown: - do: headers: { Authorization: "Basic dGVzdF91c2VyOngtcGFjay10ZXN0LXBhc3N3b3Jk" } # test_user - xpack.rollup.get_jobs: + rollup.get_jobs: id: foo - match: jobs.0.stats.documents_processed: 1 diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/start_job.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/start_job.yml index 88619e0dfc8ee..fbf9e8519059a 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/start_job.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/start_job.yml @@ -15,7 +15,7 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: foo body: > { @@ -44,7 +44,7 @@ setup: catch: /Task for Rollup Job \[does_not_exist\] not found/ headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.start_job: + rollup.start_job: id: does_not_exist @@ -54,7 +54,7 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.start_job: + rollup.start_job: id: foo - is_true: started @@ -62,6 +62,6 @@ setup: catch: /Cannot start task for Rollup Job \[foo\] because state was/ headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.start_job: + rollup.start_job: id: foo diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/stop_job.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/stop_job.yml index bcb592be7a074..7e8b6b3f61af0 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/stop_job.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/stop_job.yml @@ -15,7 +15,7 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.put_job: + rollup.put_job: id: foo body: > { @@ -44,7 +44,7 @@ setup: catch: /Task for Rollup Job \[does_not_exist\] not found/ headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.stop_job: + rollup.stop_job: id: does_not_exist @@ -54,21 +54,21 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.start_job: + rollup.start_job: id: foo - is_true: started - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.stop_job: + rollup.stop_job: id: foo - is_true: stopped - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.stop_job: + rollup.stop_job: id: foo - is_true: stopped @@ -78,7 +78,7 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.stop_job: + rollup.stop_job: id: foo - is_true: stopped @@ -92,14 +92,14 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.start_job: + rollup.start_job: id: foo - is_true: started - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.stop_job: + rollup.stop_job: id: foo wait_for_completion: true - is_true: stopped @@ -113,14 +113,14 @@ setup: - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.start_job: + rollup.start_job: id: foo - is_true: started - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser - xpack.rollup.stop_job: + rollup.stop_job: id: foo wait_for_completion: true timeout: "5s" diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/sql/sql.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/sql/sql.yml index 551866b3b1ebd..9ac15b309b161 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/sql/sql.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/sql/sql.yml @@ -26,7 +26,7 @@ setup: --- "Execute some SQL": - do: - xpack.sql.query: + sql.query: format: json body: query: "SELECT * FROM test ORDER BY int asc" @@ -42,7 +42,7 @@ setup: --- "Paging through results": - do: - xpack.sql.query: + sql.query: format: json body: query: "SELECT * FROM test ORDER BY int asc" @@ -57,7 +57,7 @@ setup: - set: { cursor: cursor } - do: - xpack.sql.query: + sql.query: format: json body: cursor: "$cursor" @@ -68,7 +68,7 @@ setup: - set: { cursor: cursor } - do: - xpack.sql.query: + sql.query: format: json body: cursor: "$cursor" @@ -79,7 +79,7 @@ setup: --- "Getting textual representation": - do: - xpack.sql.query: + sql.query: format: txt body: query: "SELECT * FROM test ORDER BY int asc" @@ -95,7 +95,7 @@ setup: --- "Clean cursor": - do: - xpack.sql.query: + sql.query: format: json body: query: "SELECT * FROM test ORDER BY int asc" @@ -108,7 +108,7 @@ setup: - set: { cursor: cursor} - do: - xpack.sql.clear_cursor: + sql.clear_cursor: body: cursor: "$cursor" - match: { "succeeded": true } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/sql/translate.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/sql/translate.yml index 9fa8e6259f5ff..57f275af5e26b 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/sql/translate.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/sql/translate.yml @@ -16,7 +16,7 @@ int: 1 - do: - xpack.sql.translate: + sql.translate: body: query: "SELECT * FROM test ORDER BY int asc" - match: diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/upgrade/10_basic.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/upgrade/10_basic.yml index a2895bb1ed7d6..acb6004b4d5c3 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/upgrade/10_basic.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/upgrade/10_basic.yml @@ -1,7 +1,7 @@ --- setup: - do: - xpack.license.post: + license.post: body: > { "license": { @@ -27,7 +27,7 @@ setup: --- "Upgrade info - all": - do: - xpack.migration.get_assistance: { index: _all } + migration.get_assistance: { index: _all } - length: { indices: 0 } @@ -35,13 +35,13 @@ setup: "Upgrade test - should fail as index is already up to date": - do: catch: /illegal_state_exception/ - xpack.migration.upgrade: { index: test1 } + migration.upgrade: { index: test1 } --- "Upgrade test - wait_for_completion:false": - do: - xpack.migration.upgrade: + migration.upgrade: index: test1 wait_for_completion: false diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/ack_watch/10_basic.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/ack_watch/10_basic.yml index 9c861e3dcd831..ed35d17984679 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/ack_watch/10_basic.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/ack_watch/10_basic.yml @@ -5,7 +5,7 @@ wait_for_status: yellow - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" body: > { @@ -38,7 +38,7 @@ wait_for_status: yellow - do: - xpack.watcher.ack_watch: + watcher.ack_watch: watch_id: "my_watch" - match: { "status.actions.test_index.ack.state" : "awaits_successful_execution" } @@ -52,7 +52,7 @@ - match: { hits.hits.0._source.status.actions.test_index.ack.state: "awaits_successful_execution" } - do: - xpack.watcher.delete_watch: + watcher.delete_watch: id: "my_watch" - match: { found: true } @@ -63,6 +63,6 @@ cluster.health: wait_for_status: yellow - do: - xpack.watcher.ack_watch: + watcher.ack_watch: watch_id: "non-existent-watch" catch: missing diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/ack_watch/20_ack_individual_action.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/ack_watch/20_ack_individual_action.yml index 813e1f0c88899..34cea0135c9ec 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/ack_watch/20_ack_individual_action.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/ack_watch/20_ack_individual_action.yml @@ -5,7 +5,7 @@ wait_for_status: yellow - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" body: > { @@ -38,14 +38,14 @@ wait_for_status: yellow - do: - xpack.watcher.ack_watch: + watcher.ack_watch: watch_id: "my_watch" action_id: "test_index" - match: { "status.actions.test_index.ack.state" : "awaits_successful_execution" } - do: - xpack.watcher.delete_watch: + watcher.delete_watch: id: "my_watch" - match: { found: true } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/ack_watch/30_reset_ack_after_unmet_condition.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/ack_watch/30_reset_ack_after_unmet_condition.yml index 2a9a4959de4c2..30787ed3c3023 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/ack_watch/30_reset_ack_after_unmet_condition.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/ack_watch/30_reset_ack_after_unmet_condition.yml @@ -7,7 +7,7 @@ setup: --- teardown: - do: - xpack.watcher.delete_watch: + watcher.delete_watch: id: "my_watch" ignore: 404 @@ -15,7 +15,7 @@ teardown: "Ensure that ack status is reset after unsuccessful execution": - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" body: > { @@ -45,7 +45,7 @@ teardown: } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "my_watch" body: > { @@ -54,18 +54,18 @@ teardown: - match: { watch_record.status.actions.indexme.ack.state: "ackable" } - do: - xpack.watcher.ack_watch: + watcher.ack_watch: watch_id: "my_watch" - match: { "status.actions.indexme.ack.state" : "acked" } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { "status.actions.indexme.ack.state" : "acked" } # having a false result will reset the ack state - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "my_watch" body: > { @@ -80,12 +80,12 @@ teardown: - match: { watch_record.status.actions.indexme.ack.state: "awaits_successful_execution" } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { "status.actions.indexme.ack.state" : "awaits_successful_execution" } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "my_watch" body: > { @@ -97,7 +97,7 @@ teardown: - match: { watch_record.status.actions.indexme.ack.state: "ackable" } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { "status.actions.indexme.ack.state" : "ackable" } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/ack_watch/40_reset_ack_after_unmet_action_condition.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/ack_watch/40_reset_ack_after_unmet_action_condition.yml index 946f23a2f5a4e..6e7e2030287f6 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/ack_watch/40_reset_ack_after_unmet_action_condition.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/ack_watch/40_reset_ack_after_unmet_action_condition.yml @@ -7,7 +7,7 @@ setup: --- teardown: - do: - xpack.watcher.delete_watch: + watcher.delete_watch: id: "my_watch" ignore: 404 @@ -15,7 +15,7 @@ teardown: "Ensure that ack status is reset after unmet action condition": - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" body: > { @@ -45,7 +45,7 @@ teardown: } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "my_watch" body: > { @@ -54,18 +54,18 @@ teardown: - match: { watch_record.status.actions.indexme.ack.state: "ackable" } - do: - xpack.watcher.ack_watch: + watcher.ack_watch: watch_id: "my_watch" - match: { "status.actions.indexme.ack.state" : "acked" } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { "status.actions.indexme.ack.state" : "acked" } # having a false result will reset the ack state - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "my_watch" body: > { @@ -80,12 +80,12 @@ teardown: - match: { watch_record.status.actions.indexme.ack.state: "awaits_successful_execution" } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { "status.actions.indexme.ack.state" : "awaits_successful_execution" } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "my_watch" body: > { @@ -97,7 +97,7 @@ teardown: - match: { watch_record.status.actions.indexme.ack.state: "ackable" } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { "status.actions.indexme.ack.state" : "ackable" } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/activate_watch/10_basic.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/activate_watch/10_basic.yml index 99459119e3cdf..5f09e7ef1847a 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/activate_watch/10_basic.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/activate_watch/10_basic.yml @@ -5,7 +5,7 @@ wait_for_status: yellow - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" body: > { @@ -34,7 +34,7 @@ - match: { _id: "my_watch" } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { found : true} @@ -42,7 +42,7 @@ - match: { status.state.active: true } - do: - xpack.watcher.deactivate_watch: + watcher.deactivate_watch: watch_id: "my_watch" - match: { status.state.active : false } @@ -56,14 +56,14 @@ - match: { hits.hits.0._source.status.state.active: false } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { found : true} - match: { _id: "my_watch" } - match: { status.state.active: false } - do: - xpack.watcher.activate_watch: + watcher.activate_watch: watch_id: "my_watch" - match: { status.state.active : true } @@ -77,7 +77,7 @@ - match: { hits.hits.0._source.status.state.active: true } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { found : true} @@ -85,7 +85,7 @@ - match: { status.state.active: true } - do: - xpack.watcher.delete_watch: + watcher.delete_watch: id: "my_watch" - match: { found: true } @@ -97,11 +97,11 @@ wait_for_status: yellow - do: - xpack.watcher.activate_watch: + watcher.activate_watch: watch_id: "non-existent-watch" catch: missing - do: - xpack.watcher.deactivate_watch: + watcher.deactivate_watch: watch_id: "non-existent-watch" catch: missing diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/delete_watch/10_basic.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/delete_watch/10_basic.yml index d22b66f85d188..1e9526ab209fa 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/delete_watch/10_basic.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/delete_watch/10_basic.yml @@ -7,14 +7,14 @@ setup: --- teardown: - do: - xpack.watcher.delete_watch: + watcher.delete_watch: id: "my_watch" ignore: 404 --- "Test delete watch api": - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" body: > { @@ -47,7 +47,7 @@ teardown: - match: { created: true } - do: - xpack.watcher.delete_watch: + watcher.delete_watch: id: "my_watch" - match: { found: true } @@ -61,6 +61,6 @@ teardown: --- "Non existent watch returns 404": - do: - xpack.watcher.delete_watch: + watcher.delete_watch: id: "non-existent-watch" catch: missing diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/10_basic.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/10_basic.yml index 1fd3c06b2eee7..4f4ab18796d7b 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/10_basic.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/10_basic.yml @@ -7,14 +7,14 @@ setup: --- teardown: - do: - xpack.watcher.delete_watch: + watcher.delete_watch: id: "test_watch" ignore: 404 --- "Test execute watch api with configured trigger data timestamps": - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "test_watch" body: > { @@ -42,7 +42,7 @@ teardown: - match: { created: true } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "test_watch" body: > { @@ -67,7 +67,7 @@ teardown: "Test execute watch API with user supplied watch": - do: - xpack.watcher.execute_watch: + watcher.execute_watch: body: > { "watch" : { @@ -104,7 +104,7 @@ teardown: "Execute unknown watch results in 404": - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "non-existent-watch" catch: missing @@ -112,7 +112,7 @@ teardown: "Test execute watch with alternative input": - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "test_watch" body: > { @@ -138,7 +138,7 @@ teardown: - match: { created: true } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "test_watch" body: > { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/20_transform.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/20_transform.yml index 3766cb6c4a788..fa0793378756e 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/20_transform.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/20_transform.yml @@ -17,7 +17,7 @@ setup: } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: body: > { "watch" : { @@ -87,7 +87,7 @@ setup: } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: body: > { "watch" : { @@ -146,7 +146,7 @@ setup: index: my_test_index - do: - xpack.watcher.execute_watch: + watcher.execute_watch: body: > { "watch" : { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/30_throttled.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/30_throttled.yml index 0d2497fed79f1..0511e4447db52 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/30_throttled.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/30_throttled.yml @@ -7,14 +7,14 @@ setup: --- teardown: - do: - xpack.watcher.delete_watch: + watcher.delete_watch: id: "test_watch" ignore: 404 --- "Test execute watch api works with throttling": - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "test_watch" body: > { @@ -41,7 +41,7 @@ teardown: - match: { created: true } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "test_watch" body: > { @@ -60,7 +60,7 @@ teardown: - match: { watch_record.status.state.active: true } - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "test_watch" body: > { @@ -87,7 +87,7 @@ teardown: - match: { _id: "test_watch" } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "test_watch" body: > { @@ -103,7 +103,7 @@ teardown: - match: { watch_record.status.execution_state: "executed" } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "test_watch" body: > { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/40_ignore_condition.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/40_ignore_condition.yml index 5c835f7d6927a..bb6efc6e1041f 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/40_ignore_condition.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/40_ignore_condition.yml @@ -7,14 +7,14 @@ setup: --- teardown: - do: - xpack.watcher.delete_watch: + watcher.delete_watch: id: "test_watch" ignore: 404 --- "Test execute watch api can ignore conditions": - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "test_watch" body: > { @@ -41,7 +41,7 @@ teardown: - match: { created: true } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "test_watch" body: > { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/50_action_mode.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/50_action_mode.yml index 3f6303b4d4718..38dcabf5601a8 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/50_action_mode.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/50_action_mode.yml @@ -7,14 +7,14 @@ setup: --- teardown: - do: - xpack.watcher.delete_watch: + watcher.delete_watch: id: "test_watch" ignore: 404 --- "Test execute watch api supports action modes": - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "test_watch" body: > { @@ -38,7 +38,7 @@ teardown: - match: { created: true } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "test_watch" body: > { @@ -55,7 +55,7 @@ teardown: - match: { watch_record.result.actions.0.status: "simulated" } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "test_watch" body: > { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/60_http_input.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/60_http_input.yml index 8a9ba14cb849a..f21981de7cfcf 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/60_http_input.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/60_http_input.yml @@ -17,7 +17,7 @@ setup: - set: { nodes.$master.http.publish_address: http_host } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: body: > { "watch" : { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/70_invalid.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/70_invalid.yml index f13c5faf59959..63ad1bd7fe233 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/70_invalid.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/70_invalid.yml @@ -2,7 +2,7 @@ "Test execute watch api returns proper error message with watch directly in the body": - do: catch: /please wrap watch including field \[trigger\] inside a \"watch\" field/ - xpack.watcher.execute_watch: + watcher.execute_watch: body: > { "trigger": { @@ -11,7 +11,7 @@ } - do: catch: /please wrap watch including field \[input\] inside a \"watch\" field/ - xpack.watcher.execute_watch: + watcher.execute_watch: body: > { "input": { @@ -22,7 +22,7 @@ } - do: catch: /please wrap watch including field \[condition\] inside a \"watch\" field/ - xpack.watcher.execute_watch: + watcher.execute_watch: body: > { "condition": { @@ -31,7 +31,7 @@ } - do: catch: /please wrap watch including field \[actions\] inside a \"watch\" field/ - xpack.watcher.execute_watch: + watcher.execute_watch: body: > { "actions": { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/get_watch/10_basic.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/get_watch/10_basic.yml index 3ae5492328702..09b2230f04c60 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/get_watch/10_basic.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/get_watch/10_basic.yml @@ -7,14 +7,14 @@ setup: --- teardown: - do: - xpack.watcher.delete_watch: + watcher.delete_watch: id: "my_watch" ignore: 404 --- "Test get watch api": - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" body: > { @@ -54,7 +54,7 @@ teardown: - match: { hits.total: 1 } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { found : true} - match: { _id: "my_watch" } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/get_watch/20_missing.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/get_watch/20_missing.yml index fc795005ac8a8..eeed53a78c856 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/get_watch/20_missing.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/get_watch/20_missing.yml @@ -6,7 +6,7 @@ # ensure index exists by creating a different watch - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "other" body: > { @@ -38,7 +38,7 @@ - do: catch: missing - xpack.watcher.get_watch: + watcher.get_watch: id: "missing_watch" - match: { found : false} - match: { _id: "missing_watch" } @@ -56,7 +56,7 @@ - do: catch: missing - xpack.watcher.get_watch: + watcher.get_watch: id: "missing_watch" - match: { found : false} - match: { _id: "missing_watch" } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/get_watch/30_with_chain_input.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/get_watch/30_with_chain_input.yml index 81a12fe6f7ddb..5e51b9c8d0414 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/get_watch/30_with_chain_input.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/get_watch/30_with_chain_input.yml @@ -5,7 +5,7 @@ wait_for_status: yellow - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" body: > { @@ -45,7 +45,7 @@ } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { found : true} - match: { _id: "my_watch" } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/10_basic.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/10_basic.yml index 78d1b6e65e666..a517293a233af 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/10_basic.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/10_basic.yml @@ -5,7 +5,7 @@ wait_for_status: yellow - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" body: > { @@ -44,7 +44,7 @@ - do: catch: bad_request - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" - match: { error.root_cause.0.type: "action_request_validation_exception" } - match: { error.root_cause.0.reason: "Validation Failed: 1: request body is missing;" } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/20_put_watch_with_throttle_period.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/20_put_watch_with_throttle_period.yml index ab8d852dab3d4..baf27eb90efd6 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/20_put_watch_with_throttle_period.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/20_put_watch_with_throttle_period.yml @@ -7,14 +7,14 @@ setup: --- teardown: - do: - xpack.watcher.delete_watch: + watcher.delete_watch: id: "my_watch1" ignore: 404 --- "Test put watch api with watch level throttle": - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch1" body: > { @@ -47,7 +47,7 @@ teardown: - match: { _id: "my_watch1" } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch1" - match: { found : true} - match: { _id: "my_watch1" } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/30_put_watch_with_action_throttle_period.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/30_put_watch_with_action_throttle_period.yml index a48d667066ef3..bf44433ebf31a 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/30_put_watch_with_action_throttle_period.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/30_put_watch_with_action_throttle_period.yml @@ -7,14 +7,14 @@ setup: --- teardown: - do: - xpack.watcher.delete_watch: + watcher.delete_watch: id: "my_watch1" ignore: 404 --- "Test put watch api with action level throttle period": - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch1" body: > { @@ -47,7 +47,7 @@ teardown: - match: { _id: "my_watch1" } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch1" - match: { found : true} - match: { _id: "my_watch1" } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/40_put_watch_as_inactive.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/40_put_watch_as_inactive.yml index 47b27d6b9be3e..18e2829993955 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/40_put_watch_as_inactive.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/40_put_watch_as_inactive.yml @@ -7,14 +7,14 @@ setup: --- teardown: - do: - xpack.watcher.delete_watch: + watcher.delete_watch: id: "my_watch" ignore: 404 --- "Test put inactive watch": - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" active: false body: > @@ -47,7 +47,7 @@ teardown: - match: { _id: "my_watch" } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { found : true } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/50_email_attachment_validation.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/50_email_attachment_validation.yml index e76ab7fd71508..d86b496fde116 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/50_email_attachment_validation.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/50_email_attachment_validation.yml @@ -6,7 +6,7 @@ - do: catch: /Configured URL is empty/ - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" body: > { @@ -45,7 +45,7 @@ - do: catch: /Malformed URL/ - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" body: > { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/60_put_watch_with_action_condition.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/60_put_watch_with_action_condition.yml index bc26a60e4702f..517bb68dbec96 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/60_put_watch_with_action_condition.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/60_put_watch_with_action_condition.yml @@ -7,14 +7,14 @@ setup: --- teardown: - do: - xpack.watcher.delete_watch: + watcher.delete_watch: id: "my_watch1" ignore: 404 --- "Test put watch api with action level condition": - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch1" body: > { @@ -51,7 +51,7 @@ teardown: - match: { _id: "my_watch1" } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch1" - match: { found : true } - match: { _id: "my_watch1" } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/70_put_watch_with_index_action_using_id.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/70_put_watch_with_index_action_using_id.yml index 7bad6c8f1eebf..23d1b1057cfa0 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/70_put_watch_with_index_action_using_id.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/70_put_watch_with_index_action_using_id.yml @@ -7,14 +7,14 @@ setup: --- teardown: - do: - xpack.watcher.delete_watch: + watcher.delete_watch: id: "my_watch" ignore: 404 --- "Test put watch api with index action using doc_id": - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" body: > { @@ -45,7 +45,7 @@ teardown: - match: { _id: "my_watch" } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { found : true } - match: { _id: "my_watch" } @@ -53,7 +53,7 @@ teardown: - match: { watch.actions.test_index.index.doc_id: "test_id1" } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "my_watch" - match: { watch_record.state: "executed" } - match: { watch_record.status.execution_state: "executed" } @@ -62,7 +62,7 @@ teardown: --- "Test put watch api with index action using _id field": - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" body: > { @@ -93,7 +93,7 @@ teardown: - match: { _id: "my_watch" } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { found : true } - match: { _id: "my_watch" } @@ -101,7 +101,7 @@ teardown: - match: { watch.input.simple.value: 20 } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "my_watch" - match: { watch_record.state: "executed" } - match: { watch_record.status.execution_state: "executed" } @@ -110,7 +110,7 @@ teardown: --- "Test put watch api with bulk index action using _id field": - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" body: > { @@ -149,7 +149,7 @@ teardown: - match: { _id: "my_watch" } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { found : true } - match: { _id: "my_watch" } @@ -159,7 +159,7 @@ teardown: - match: { watch.input.simple._doc.1.value: 40 } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "my_watch" - match: { watch_record.state: "executed" } - match: { watch_record.status.execution_state: "executed" } @@ -169,7 +169,7 @@ teardown: --- "Test put watch api with bulk index action using _id field in one document": - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" body: > { @@ -207,7 +207,7 @@ teardown: - match: { _id: "my_watch" } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { found : true } - match: { _id: "my_watch" } @@ -216,7 +216,7 @@ teardown: - match: { watch.input.simple._doc.1.value: 60 } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "my_watch" - match: { watch_record.state: "executed" } - match: { watch_record.status.execution_state: "executed" } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/80_put_get_watch_with_passwords.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/80_put_get_watch_with_passwords.yml index ebef6c87d7022..077ddd2d30825 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/80_put_get_watch_with_passwords.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/80_put_get_watch_with_passwords.yml @@ -8,7 +8,7 @@ setup: "Test getting a watch does not contain the original password": - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "watch_with_password" body: > { @@ -40,7 +40,7 @@ setup: } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "watch_with_password" - match: { _id: "watch_with_password" } - match: { watch.input.http.request.auth.basic.password: "::es_redacted::" } @@ -50,7 +50,7 @@ setup: # version 1 - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "watch_without_version_test" body: > { @@ -83,7 +83,7 @@ setup: - do: catch: bad_request - xpack.watcher.put_watch: + watcher.put_watch: id: "watch_without_version_test" body: > { @@ -123,7 +123,7 @@ setup: # version 1 - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "watch_with_seq_no" body: > { @@ -161,7 +161,7 @@ setup: # as if two users in the watch UI tried to update the same watch - do: catch: conflict - xpack.watcher.put_watch: + watcher.put_watch: id: "watch_with_seq_no" if_seq_no: 123034 if_primary_term: $primaryTerm @@ -196,7 +196,7 @@ setup: - do: catch: conflict - xpack.watcher.put_watch: + watcher.put_watch: id: "watch_with_seq_no" if_seq_no: $seqNo if_primary_term: 234242423 @@ -230,7 +230,7 @@ setup: } - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "watch_with_seq_no" if_seq_no: $seqNo if_primary_term: $primaryTerm diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/90_ensure_watch_gets_overwritten_without_version.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/90_ensure_watch_gets_overwritten_without_version.yml index 4bea2f655e624..8a9ceb04dc90e 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/90_ensure_watch_gets_overwritten_without_version.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/90_ensure_watch_gets_overwritten_without_version.yml @@ -5,7 +5,7 @@ wait_for_status: yellow - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" body: > { @@ -32,14 +32,14 @@ - match: { _id: "my_watch" } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { watch.input.simple.foo: "bar" } # change the simple input fields, then ensure the old # field does not exist on get - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" body: > { @@ -66,7 +66,7 @@ - match: { _id: "my_watch" } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { watch.input.simple.spam: "eggs" } - is_false: watch.input.simple.foo diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/91_search_total_hits_as_int.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/91_search_total_hits_as_int.yml index eba7f75a75968..c427f634a604e 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/91_search_total_hits_as_int.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/91_search_total_hits_as_int.yml @@ -18,7 +18,7 @@ setup: "Test search input includes hits by default": - do: - xpack.watcher.execute_watch: + watcher.execute_watch: body: > { "watch" : { @@ -61,7 +61,7 @@ setup: "Test search transform includes hits by default": - do: - xpack.watcher.execute_watch: + watcher.execute_watch: body: > { "watch" : { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/start_watcher/10_basic.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/start_watcher/10_basic.yml index 575d01fcee767..d3d25ae1ea7a6 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/start_watcher/10_basic.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/start_watcher/10_basic.yml @@ -4,5 +4,5 @@ cluster.health: wait_for_status: yellow - - do: {xpack.watcher.start: {}} + - do: {watcher.start: {}} - match: { acknowledged: true } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/stats/10_basic.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/stats/10_basic.yml index 5a90af3725294..f5a8b149fe952 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/stats/10_basic.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/stats/10_basic.yml @@ -1,13 +1,13 @@ --- "Test watcher stats output": - - do: {xpack.watcher.stats: {}} + - do: {watcher.stats: {}} - match: { "manually_stopped": false } - match: { "stats.0.watcher_state": "started" } --- "Test watcher stats supports emit_stacktraces parameter": - do: - xpack.watcher.stats: + watcher.stats: metric: "all" emit_stacktraces: "true" - match: { "manually_stopped": false } @@ -20,7 +20,7 @@ reason: metrics were fixed in 7.0.0 - do: - xpack.watcher.stats: + watcher.stats: metric: "current_watches" - is_false: stats.0.queued_watches @@ -33,7 +33,7 @@ reason: metrics were fixed in 7.0.0 - do: - xpack.watcher.stats: + watcher.stats: metric: "queued_watches" - is_false: stats.0.current_watches @@ -50,7 +50,7 @@ warnings: - 'The pending_watches parameter is deprecated, use queued_watches instead' - xpack.watcher.stats: + watcher.stats: metric: "pending_watches" - is_false: stats.0.current_watches @@ -59,7 +59,7 @@ --- "Test watcher stats all watches": - do: - xpack.watcher.stats: + watcher.stats: metric: "_all" - is_true: stats.0.current_watches diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/stop_watcher/10_basic.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/stop_watcher/10_basic.yml index 518714c57ab3f..a4bac7b78a10f 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/stop_watcher/10_basic.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/stop_watcher/10_basic.yml @@ -4,8 +4,8 @@ cluster.health: wait_for_status: yellow - - do: {xpack.watcher.stop: {}} + - do: {watcher.stop: {}} - match: { acknowledged: true } - - do: {xpack.watcher.start: {}} + - do: {watcher.start: {}} - match: { acknowledged: true } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/usage/10_basic.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/usage/10_basic.yml index 432308581f6f0..754f5281d8535 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/usage/10_basic.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/usage/10_basic.yml @@ -2,7 +2,7 @@ "Test watcher usage stats output": - do: catch: missing - xpack.watcher.delete_watch: + watcher.delete_watch: id: "usage_stats_watch" - do: {xpack.usage: {}} @@ -10,7 +10,7 @@ - set: { "watcher.count.total": watch_count_total } - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "usage_stats_watch" body: > { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/xpack/15_basic.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/xpack/15_basic.yml index 5e61f98bbc297..213d935a5c52f 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/xpack/15_basic.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/xpack/15_basic.yml @@ -7,7 +7,7 @@ wait_for_status: yellow - do: - xpack.license.delete: {} + license.delete: {} - match: { acknowledged: true } # we don't have a license now @@ -30,7 +30,7 @@ # - is_false: features.monitoring.available TODO fix once licensing is fixed - do: - xpack.license.post: + license.post: body: > { "license": { @@ -49,7 +49,7 @@ - match: { license_status: "valid" } - do: - xpack.license.get: {} + license.get: {} - match: { license.uid: "893361dc-9749-4997-93cb-802e3dofh7aa" } - match: { license.type: "internal" } - match: { license.status: "active" } diff --git a/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/60_watcher.yml b/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/60_watcher.yml index 2952e649c76c8..af6f9c47ed559 100644 --- a/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/60_watcher.yml +++ b/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/60_watcher.yml @@ -3,7 +3,7 @@ # no need to put watch, exists already - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { found : true} - match: { _id: "my_watch" } @@ -11,7 +11,7 @@ # execute watch - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "my_watch" body: > { @@ -41,12 +41,12 @@ # deactivate watch, check with GET API as well - do: - xpack.watcher.deactivate_watch: + watcher.deactivate_watch: watch_id: "my_watch" - match: { status.state.active : false } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { found : true} - match: { _id: "my_watch" } @@ -55,12 +55,12 @@ # activate watch again, check with GET API as well - do: - xpack.watcher.activate_watch: + watcher.activate_watch: watch_id: "my_watch" - match: { status.state.active : true } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { found : true} - match: { _id: "my_watch" } @@ -70,6 +70,6 @@ --- "Test watcher stats output": - do: - xpack.watcher.stats: {} + watcher.stats: {} - match: { "manually_stopped": false } - match: { "stats.0.watcher_state": "started" } diff --git a/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/60_watcher.yml b/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/60_watcher.yml index 810307bbb2846..3cfc3f2c461d9 100644 --- a/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/60_watcher.yml +++ b/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/60_watcher.yml @@ -2,7 +2,7 @@ "CRUD watch APIs": - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" body: > { @@ -23,7 +23,7 @@ - match: { _id: "my_watch" } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { found : true} - match: { _id: "my_watch" } @@ -31,7 +31,7 @@ # execute watch - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "my_watch" body: > { @@ -61,12 +61,12 @@ # deactivate watch, check with GET API as well - do: - xpack.watcher.deactivate_watch: + watcher.deactivate_watch: watch_id: "my_watch" - match: { status.state.active : false } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { found : true} - match: { _id: "my_watch" } @@ -75,12 +75,12 @@ # activate watch again, check with GET API as well - do: - xpack.watcher.activate_watch: + watcher.activate_watch: watch_id: "my_watch" - match: { status.state.active : true } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { found : true} - match: { _id: "my_watch" } @@ -90,6 +90,6 @@ --- "Test watcher stats output": - do: - xpack.watcher.stats: {} + watcher.stats: {} - match: { "manually_stopped": false } - match: { "stats.0.watcher_state": "started" } diff --git a/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/upgraded_cluster/60_watcher.yml b/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/upgraded_cluster/60_watcher.yml index 3828db6128f91..6a7a225912e3e 100644 --- a/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/upgraded_cluster/60_watcher.yml +++ b/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/upgraded_cluster/60_watcher.yml @@ -3,7 +3,7 @@ # no need to put watch, exists already - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { found : true} - match: { _id: "my_watch" } @@ -11,7 +11,7 @@ # execute watch - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "my_watch" body: > { @@ -41,12 +41,12 @@ # deactivate watch, check with GET API as well - do: - xpack.watcher.deactivate_watch: + watcher.deactivate_watch: watch_id: "my_watch" - match: { status.state.active : false } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { found : true} - match: { _id: "my_watch" } @@ -55,12 +55,12 @@ # activate watch again, check with GET API as well - do: - xpack.watcher.activate_watch: + watcher.activate_watch: watch_id: "my_watch" - match: { status.state.active : true } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { found : true} - match: { _id: "my_watch" } @@ -69,6 +69,6 @@ --- "Test watcher stats output": - do: - xpack.watcher.stats: {} + watcher.stats: {} - match: { "manually_stopped": false } - match: { "stats.0.watcher_state": "started" } diff --git a/x-pack/qa/smoke-test-watcher-with-security/src/test/java/org/elasticsearch/smoketest/SmokeTestWatcherWithSecurityClientYamlTestSuiteIT.java b/x-pack/qa/smoke-test-watcher-with-security/src/test/java/org/elasticsearch/smoketest/SmokeTestWatcherWithSecurityClientYamlTestSuiteIT.java index eb92bd29cd78d..5eabd512dc525 100644 --- a/x-pack/qa/smoke-test-watcher-with-security/src/test/java/org/elasticsearch/smoketest/SmokeTestWatcherWithSecurityClientYamlTestSuiteIT.java +++ b/x-pack/qa/smoke-test-watcher-with-security/src/test/java/org/elasticsearch/smoketest/SmokeTestWatcherWithSecurityClientYamlTestSuiteIT.java @@ -53,13 +53,13 @@ public void startWatcher() throws Exception { assertBusy(() -> { ClientYamlTestResponse response = - getAdminExecutionContext().callApi("xpack.watcher.stats", emptyMap(), emptyList(), emptyMap()); + getAdminExecutionContext().callApi("watcher.stats", emptyMap(), emptyList(), emptyMap()); String state = (String) response.evaluate("stats.0.watcher_state"); switch (state) { case "stopped": ClientYamlTestResponse startResponse = - getAdminExecutionContext().callApi("xpack.watcher.start", emptyMap(), emptyList(), emptyMap()); + getAdminExecutionContext().callApi("watcher.start", emptyMap(), emptyList(), emptyMap()); boolean isAcknowledged = (boolean) startResponse.evaluate("acknowledged"); assertThat(isAcknowledged, is(true)); throw new AssertionError("waiting until stopped state reached started state"); @@ -88,7 +88,7 @@ public void startWatcher() throws Exception { public void stopWatcher() throws Exception { assertBusy(() -> { ClientYamlTestResponse response = - getAdminExecutionContext().callApi("xpack.watcher.stats", emptyMap(), emptyList(), emptyMap()); + getAdminExecutionContext().callApi("watcher.stats", emptyMap(), emptyList(), emptyMap()); String state = (String) response.evaluate("stats.0.watcher_state"); switch (state) { @@ -101,7 +101,7 @@ public void stopWatcher() throws Exception { throw new AssertionError("waiting until starting state reached started state to stop"); case "started": ClientYamlTestResponse stopResponse = - getAdminExecutionContext().callApi("xpack.watcher.stop", emptyMap(), emptyList(), emptyMap()); + getAdminExecutionContext().callApi("watcher.stop", emptyMap(), emptyList(), emptyMap()); boolean isAcknowledged = (boolean) stopResponse.evaluate("acknowledged"); assertThat(isAcknowledged, is(true)); throw new AssertionError("waiting until started state reached stopped state"); diff --git a/x-pack/qa/smoke-test-watcher-with-security/src/test/resources/rest-api-spec/test/watcher/watcher_and_security/10_insufficient_privs.yml b/x-pack/qa/smoke-test-watcher-with-security/src/test/resources/rest-api-spec/test/watcher/watcher_and_security/10_insufficient_privs.yml index e3c512560a992..3cd7a43e69c08 100644 --- a/x-pack/qa/smoke-test-watcher-with-security/src/test/resources/rest-api-spec/test/watcher/watcher_and_security/10_insufficient_privs.yml +++ b/x-pack/qa/smoke-test-watcher-with-security/src/test/resources/rest-api-spec/test/watcher/watcher_and_security/10_insufficient_privs.yml @@ -5,10 +5,10 @@ - do: headers: { es-security-runas-user: powerless_user } catch: forbidden - xpack.watcher.stats: {} + watcher.stats: {} # there seems to be a bug in the yaml parser we use, where a single element list # has the END_LIST token skipped...so here we just rerun the same request without # the impersonation to show it works - do: - xpack.watcher.stats: {} + watcher.stats: {} - match: { stats.0.watcher_state: started } diff --git a/x-pack/qa/smoke-test-watcher-with-security/src/test/resources/rest-api-spec/test/watcher/watcher_and_security/20_test_run_as_execute_watch.yml b/x-pack/qa/smoke-test-watcher-with-security/src/test/resources/rest-api-spec/test/watcher/watcher_and_security/20_test_run_as_execute_watch.yml index ec0be2532a6ee..b50f20afd0358 100644 --- a/x-pack/qa/smoke-test-watcher-with-security/src/test/resources/rest-api-spec/test/watcher/watcher_and_security/20_test_run_as_execute_watch.yml +++ b/x-pack/qa/smoke-test-watcher-with-security/src/test/resources/rest-api-spec/test/watcher/watcher_and_security/20_test_run_as_execute_watch.yml @@ -18,7 +18,7 @@ setup: --- teardown: - do: - xpack.watcher.delete_watch: + watcher.delete_watch: id: "my_watch" ignore: 404 @@ -27,7 +27,7 @@ teardown: - skip: features: headers - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" body: > { @@ -63,13 +63,13 @@ teardown: - match: { _id: "my_watch" } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { _id: "my_watch" } - is_false: watch.status.headers - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "my_watch" - match: { watch_record.watch_id: "my_watch" } - match: { watch_record.state: "executed" } @@ -83,7 +83,7 @@ teardown: - skip: features: headers - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" body: > { @@ -119,14 +119,14 @@ teardown: - match: { _id: "my_watch" } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { _id: "my_watch" } - is_false: watch.status.headers - do: headers: { es-security-runas-user: x_pack_rest_user } - xpack.watcher.execute_watch: + watcher.execute_watch: id: "my_watch" - match: { watch_record.watch_id: "my_watch" } - match: { watch_record.state: "executed" } @@ -140,7 +140,7 @@ teardown: - do: # by impersonating this request as powerless user we cannot query the my_test_index # headers: { es-security-runas-user: powerless_user } - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" body: > { @@ -176,13 +176,13 @@ teardown: - match: { _id: "my_watch" } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { _id: "my_watch" } - is_false: watch.status.headers - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "my_watch" - match: { watch_record.watch_id: "my_watch" } # because we are not allowed to read the index, there wont be any data @@ -193,7 +193,7 @@ teardown: --- "Test watch search transform is run as user who added the watch": - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" body: > { @@ -227,7 +227,7 @@ teardown: - match: { _id: "my_watch" } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "my_watch" - match: { watch_record.watch_id: "my_watch" } @@ -242,7 +242,7 @@ teardown: --- "Test watch search transform does not work without permissions": - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" body: > { @@ -277,7 +277,7 @@ teardown: - match: { _id: "my_watch" } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "my_watch" - match: { watch_record.watch_id: "my_watch" } @@ -294,7 +294,7 @@ teardown: - skip: features: headers - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" body: > { @@ -318,13 +318,13 @@ teardown: - match: { _id: "my_watch" } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { _id: "my_watch" } - is_false: watch.status.headers - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "my_watch" - match: { watch_record.watch_id: "my_watch" } - match: { watch_record.state: "executed" } @@ -343,7 +343,7 @@ teardown: - skip: features: headers - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" body: > { @@ -367,13 +367,13 @@ teardown: - match: { _id: "my_watch" } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_watch" - match: { _id: "my_watch" } - is_false: watch.status.headers - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "my_watch" - match: { watch_record.watch_id: "my_watch" } - match: { watch_record.state: "executed" } diff --git a/x-pack/qa/smoke-test-watcher/src/test/java/org/elasticsearch/smoketest/WatcherRestIT.java b/x-pack/qa/smoke-test-watcher/src/test/java/org/elasticsearch/smoketest/WatcherRestIT.java index 771302a99bbfb..1d7759b28b9fe 100644 --- a/x-pack/qa/smoke-test-watcher/src/test/java/org/elasticsearch/smoketest/WatcherRestIT.java +++ b/x-pack/qa/smoke-test-watcher/src/test/java/org/elasticsearch/smoketest/WatcherRestIT.java @@ -35,13 +35,13 @@ public static Iterable parameters() throws Exception { public void startWatcher() throws Exception { assertBusy(() -> { ClientYamlTestResponse response = - getAdminExecutionContext().callApi("xpack.watcher.stats", emptyMap(), emptyList(), emptyMap()); + getAdminExecutionContext().callApi("watcher.stats", emptyMap(), emptyList(), emptyMap()); String state = (String) response.evaluate("stats.0.watcher_state"); switch (state) { case "stopped": ClientYamlTestResponse startResponse = - getAdminExecutionContext().callApi("xpack.watcher.start", emptyMap(), emptyList(), emptyMap()); + getAdminExecutionContext().callApi("watcher.start", emptyMap(), emptyList(), emptyMap()); boolean isAcknowledged = (boolean) startResponse.evaluate("acknowledged"); assertThat(isAcknowledged, is(true)); throw new AssertionError("waiting until stopped state reached started state"); @@ -70,7 +70,7 @@ public void startWatcher() throws Exception { public void stopWatcher() throws Exception { assertBusy(() -> { ClientYamlTestResponse response = - getAdminExecutionContext().callApi("xpack.watcher.stats", emptyMap(), emptyList(), emptyMap()); + getAdminExecutionContext().callApi("watcher.stats", emptyMap(), emptyList(), emptyMap()); String state = (String) response.evaluate("stats.0.watcher_state"); switch (state) { @@ -83,7 +83,7 @@ public void stopWatcher() throws Exception { throw new AssertionError("waiting until starting state reached started state to stop"); case "started": ClientYamlTestResponse stopResponse = - getAdminExecutionContext().callApi("xpack.watcher.stop", emptyMap(), emptyList(), emptyMap()); + getAdminExecutionContext().callApi("watcher.stop", emptyMap(), emptyList(), emptyMap()); boolean isAcknowledged = (boolean) stopResponse.evaluate("acknowledged"); assertThat(isAcknowledged, is(true)); throw new AssertionError("waiting until started state reached stopped state"); diff --git a/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/10_webhook.yml b/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/10_webhook.yml index 50ee1f6eafdb9..5a5a4dfe46205 100644 --- a/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/10_webhook.yml +++ b/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/10_webhook.yml @@ -26,7 +26,7 @@ - set: { docs.0.doc._source.port: port } - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "test_watch" body: trigger: @@ -53,7 +53,7 @@ - match: { created: true } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: test_watch body: record_execution: true diff --git a/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/20_array_access.yml b/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/20_array_access.yml index bb52ee7f8d176..6371e743821ab 100644 --- a/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/20_array_access.yml +++ b/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/20_array_access.yml @@ -5,7 +5,7 @@ wait_for_status: yellow - do: - xpack.watcher.execute_watch: + watcher.execute_watch: body: > { "watch": { diff --git a/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/25_array_compare.yml b/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/25_array_compare.yml index e252932393262..9371040a0ff50 100644 --- a/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/25_array_compare.yml +++ b/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/25_array_compare.yml @@ -36,7 +36,7 @@ indices.refresh: {} - do: - xpack.watcher.execute_watch: + watcher.execute_watch: body: > { "watch" : { diff --git a/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/30_search_input.yml b/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/30_search_input.yml index 074b8d0fea7ca..d712ddba3a498 100644 --- a/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/30_search_input.yml +++ b/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/30_search_input.yml @@ -3,7 +3,7 @@ setup: - do: cluster.health: wait_for_status: yellow - - do: {xpack.watcher.stats:{}} + - do: {watcher.stats:{}} - do: index: index: idx @@ -51,7 +51,7 @@ setup: --- "Test search input mustache integration (using request body)": - do: - xpack.watcher.execute_watch: + watcher.execute_watch: body: > { "trigger_data" : { @@ -126,7 +126,7 @@ setup: - match: { acknowledged: true } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: body: > { "trigger_data" : { @@ -172,7 +172,7 @@ setup: version: " - 6.99.99" reason: "rest_total_hits_as_int support was added in 7.0" - do: - xpack.watcher.execute_watch: + watcher.execute_watch: body: > { "trigger_data" : { @@ -250,7 +250,7 @@ setup: - match: { acknowledged: true } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: body: > { "trigger_data" : { diff --git a/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/40_search_transform.yml b/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/40_search_transform.yml index abad97ae944f8..08ff0fae5ba7b 100644 --- a/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/40_search_transform.yml +++ b/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/40_search_transform.yml @@ -3,7 +3,7 @@ setup: - do: cluster.health: wait_for_status: yellow - - do: {xpack.watcher.stats:{}} + - do: {watcher.stats:{}} - do: index: index: idx @@ -51,7 +51,7 @@ setup: --- "Test search transform mustache integration (using request body)": - do: - xpack.watcher.execute_watch: + watcher.execute_watch: body: > { "trigger_data" : { @@ -110,7 +110,7 @@ setup: --- "Test search transform mustache integration (using request template)": - do: - xpack.watcher.execute_watch: + watcher.execute_watch: body: > { "trigger_data" : { diff --git a/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/50_webhook_url_escaping.yml b/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/50_webhook_url_escaping.yml index 713dbb65b3db6..01326f9764fa1 100644 --- a/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/50_webhook_url_escaping.yml +++ b/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/50_webhook_url_escaping.yml @@ -12,7 +12,7 @@ refresh: true body: { foo: bar } - - do: {xpack.watcher.stats:{}} + - do: {watcher.stats:{}} - match: { "stats.0.watcher_state": "started" } - match: { "stats.0.watch_count": 0 } @@ -38,7 +38,7 @@ - set: { docs.0.doc._source.port: port } - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "test_watch" body: metadata: @@ -73,7 +73,7 @@ - match: { created: true } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "test_watch" - do: diff --git a/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/10_basic.yml b/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/10_basic.yml index 4ea2a8dc7ab74..7f6db2a6d6614 100644 --- a/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/10_basic.yml +++ b/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/10_basic.yml @@ -5,7 +5,7 @@ wait_for_status: green - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_exe_watch" body: > { @@ -80,7 +80,7 @@ - match: { _id: "my_exe_watch" } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_exe_watch" - match: { _id: "my_exe_watch" } @@ -88,7 +88,7 @@ - match: { watch.input.chain.inputs.1.second.transform.script.source: "return [ 'hits' : [ 'total' : ctx.payload.first.hits.total ]]" } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "my_exe_watch" body: > { @@ -132,7 +132,7 @@ wait_for_status: green - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_exe_watch" body: > { @@ -207,7 +207,7 @@ - match: { _id: "my_exe_watch" } - do: - xpack.watcher.get_watch: + watcher.get_watch: id: "my_exe_watch" - match: { _id: "my_exe_watch" } @@ -215,7 +215,7 @@ - match: { watch.input.chain.inputs.1.second.transform.script.source: "return [ 'hits' : [ 'total' : ctx.payload.first.hits.total ]]" } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "my_exe_watch" body: > { diff --git a/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/20_minimal_body.yml b/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/20_minimal_body.yml index f5f0a6cd04b0d..b95d2843aeb88 100644 --- a/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/20_minimal_body.yml +++ b/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/20_minimal_body.yml @@ -5,7 +5,7 @@ wait_for_status: green - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_logging_watch" body: > { @@ -34,7 +34,7 @@ - match: { _id: "my_logging_watch" } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "my_logging_watch" - match: { "watch_record.watch_id": "my_logging_watch" } diff --git a/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/30_inline_watch.yml b/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/30_inline_watch.yml index f9ad2a42414bd..d4ff40b9b084a 100644 --- a/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/30_inline_watch.yml +++ b/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/30_inline_watch.yml @@ -5,7 +5,7 @@ wait_for_status: green - do: - xpack.watcher.execute_watch: + watcher.execute_watch: body: > { "trigger_data" : { diff --git a/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/40_exception.yml b/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/40_exception.yml index b8839ea364e45..411ef8426552a 100644 --- a/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/40_exception.yml +++ b/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/40_exception.yml @@ -6,7 +6,7 @@ - do: catch: bad_request - xpack.watcher.put_watch: + watcher.put_watch: id: "my_exe_watch" body: > { @@ -42,7 +42,7 @@ wait_for_status: green - do: - xpack.watcher.execute_watch: + watcher.execute_watch: body: > { "watch" : { @@ -80,7 +80,7 @@ - do: catch: bad_request - xpack.watcher.execute_watch: + watcher.execute_watch: body: > { "watch": { diff --git a/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/50_update_scripts.yml b/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/50_update_scripts.yml index 89e6602035c2a..e764505f9c058 100644 --- a/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/50_update_scripts.yml +++ b/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/50_update_scripts.yml @@ -21,7 +21,7 @@ } - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" body: > { @@ -50,7 +50,7 @@ - match: { _id: "my_watch" } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "my_watch" - match: { "watch_record.watch_id": "my_watch" } @@ -69,7 +69,7 @@ } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "my_watch" - match: { "watch_record.watch_id": "my_watch" } @@ -97,7 +97,7 @@ } - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "my_watch" body: > { @@ -126,7 +126,7 @@ - match: { _id: "my_watch" } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "my_watch" - match: { "watch_record.watch_id": "my_watch" } @@ -144,7 +144,7 @@ } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "my_watch" - match: { "watch_record.watch_id": "my_watch" } diff --git a/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/60_chain_input_with_transform.yml b/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/60_chain_input_with_transform.yml index 69fd7b4d575ee..d8545110c024e 100644 --- a/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/60_chain_input_with_transform.yml +++ b/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/60_chain_input_with_transform.yml @@ -5,7 +5,7 @@ wait_for_status: yellow - do: - xpack.watcher.execute_watch: + watcher.execute_watch: body: > { "watch" : { diff --git a/x-pack/qa/third-party/hipchat/src/test/java/org/elasticsearch/smoketest/WatcherHipchatYamlTestSuiteIT.java b/x-pack/qa/third-party/hipchat/src/test/java/org/elasticsearch/smoketest/WatcherHipchatYamlTestSuiteIT.java index 785b9d3a89249..b5cb43ebc282b 100644 --- a/x-pack/qa/third-party/hipchat/src/test/java/org/elasticsearch/smoketest/WatcherHipchatYamlTestSuiteIT.java +++ b/x-pack/qa/third-party/hipchat/src/test/java/org/elasticsearch/smoketest/WatcherHipchatYamlTestSuiteIT.java @@ -40,7 +40,7 @@ public void startWatcher() throws Exception { final List watcherTemplates = Arrays.asList(WatcherIndexTemplateRegistryField.TEMPLATE_NAMES); assertBusy(() -> { try { - getAdminExecutionContext().callApi("xpack.watcher.start", emptyMap(), emptyList(), emptyMap()); + getAdminExecutionContext().callApi("watcher.start", emptyMap(), emptyList(), emptyMap()); for (String template : watcherTemplates) { ClientYamlTestResponse templateExistsResponse = getAdminExecutionContext().callApi("indices.exists_template", @@ -49,7 +49,7 @@ public void startWatcher() throws Exception { } ClientYamlTestResponse response = - getAdminExecutionContext().callApi("xpack.watcher.stats", emptyMap(), emptyList(), emptyMap()); + getAdminExecutionContext().callApi("watcher.stats", emptyMap(), emptyList(), emptyMap()); String state = (String) response.evaluate("stats.0.watcher_state"); assertThat(state, is("started")); } catch (IOException e) { @@ -62,9 +62,9 @@ public void startWatcher() throws Exception { public void stopWatcher() throws Exception { assertBusy(() -> { try { - getAdminExecutionContext().callApi("xpack.watcher.stop", emptyMap(), emptyList(), emptyMap()); + getAdminExecutionContext().callApi("watcher.stop", emptyMap(), emptyList(), emptyMap()); ClientYamlTestResponse response = - getAdminExecutionContext().callApi("xpack.watcher.stats", emptyMap(), emptyList(), emptyMap()); + getAdminExecutionContext().callApi("watcher.stats", emptyMap(), emptyList(), emptyMap()); String state = (String) response.evaluate("stats.0.watcher_state"); assertThat(state, is("stopped")); } catch (IOException e) { diff --git a/x-pack/qa/third-party/hipchat/src/test/resources/rest-api-spec/test/hipchat/10_hipchat.yml b/x-pack/qa/third-party/hipchat/src/test/resources/rest-api-spec/test/hipchat/10_hipchat.yml index bd4751cac4b78..be4874b8d42e5 100644 --- a/x-pack/qa/third-party/hipchat/src/test/resources/rest-api-spec/test/hipchat/10_hipchat.yml +++ b/x-pack/qa/third-party/hipchat/src/test/resources/rest-api-spec/test/hipchat/10_hipchat.yml @@ -5,7 +5,7 @@ wait_for_status: yellow - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "hipchat_v1_watch" body: > { @@ -37,7 +37,7 @@ } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "hipchat_v1_watch" body: > { @@ -101,7 +101,7 @@ # custom rooms, custom users and custom from are not allowed for this account type to be configured - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "hipchat_integration_account_watch" body: > { @@ -131,7 +131,7 @@ } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "hipchat_integration_account_watch" body: > { @@ -186,7 +186,7 @@ wait_for_status: yellow - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "hipchat_user_account_watch" body: > { @@ -216,7 +216,7 @@ } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "hipchat_user_account_watch" body: > { diff --git a/x-pack/qa/third-party/jira/src/test/java/org/elasticsearch/smoketest/WatcherJiraYamlTestSuiteIT.java b/x-pack/qa/third-party/jira/src/test/java/org/elasticsearch/smoketest/WatcherJiraYamlTestSuiteIT.java index 8218d0e18f67b..0eca4d03dfd06 100644 --- a/x-pack/qa/third-party/jira/src/test/java/org/elasticsearch/smoketest/WatcherJiraYamlTestSuiteIT.java +++ b/x-pack/qa/third-party/jira/src/test/java/org/elasticsearch/smoketest/WatcherJiraYamlTestSuiteIT.java @@ -40,7 +40,7 @@ public void startWatcher() throws Exception { final List watcherTemplates = Arrays.asList(WatcherIndexTemplateRegistryField.TEMPLATE_NAMES); assertBusy(() -> { try { - getAdminExecutionContext().callApi("xpack.watcher.start", emptyMap(), emptyList(), emptyMap()); + getAdminExecutionContext().callApi("watcher.start", emptyMap(), emptyList(), emptyMap()); for (String template : watcherTemplates) { ClientYamlTestResponse templateExistsResponse = getAdminExecutionContext().callApi("indices.exists_template", @@ -49,7 +49,7 @@ public void startWatcher() throws Exception { } ClientYamlTestResponse response = - getAdminExecutionContext().callApi("xpack.watcher.stats", emptyMap(), emptyList(), emptyMap()); + getAdminExecutionContext().callApi("watcher.stats", emptyMap(), emptyList(), emptyMap()); String state = (String) response.evaluate("stats.0.watcher_state"); assertThat(state, is("started")); } catch (IOException e) { @@ -62,9 +62,9 @@ public void startWatcher() throws Exception { public void stopWatcher() throws Exception { assertBusy(() -> { try { - getAdminExecutionContext().callApi("xpack.watcher.stop", emptyMap(), emptyList(), emptyMap()); + getAdminExecutionContext().callApi("watcher.stop", emptyMap(), emptyList(), emptyMap()); ClientYamlTestResponse response = - getAdminExecutionContext().callApi("xpack.watcher.stats", emptyMap(), emptyList(), emptyMap()); + getAdminExecutionContext().callApi("watcher.stats", emptyMap(), emptyList(), emptyMap()); String state = (String) response.evaluate("stats.0.watcher_state"); assertThat(state, is("stopped")); } catch (IOException e) { diff --git a/x-pack/qa/third-party/jira/src/test/resources/rest-api-spec/test/jira/10_jira.yml b/x-pack/qa/third-party/jira/src/test/resources/rest-api-spec/test/jira/10_jira.yml index 55573f0c0f0c7..d914b63391146 100644 --- a/x-pack/qa/third-party/jira/src/test/resources/rest-api-spec/test/jira/10_jira.yml +++ b/x-pack/qa/third-party/jira/src/test/resources/rest-api-spec/test/jira/10_jira.yml @@ -5,7 +5,7 @@ wait_for_status: yellow - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "jira_watch" body: > { @@ -43,7 +43,7 @@ - match: { created: true } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "jira_watch" body: > { @@ -126,7 +126,7 @@ wait_for_status: yellow - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "wrong_jira_watch" body: > { @@ -161,7 +161,7 @@ - match: { created: true } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "wrong_jira_watch" body: > { @@ -226,7 +226,7 @@ wait_for_status: yellow - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "jira_watch_with_custom_field_one" body: > { @@ -262,7 +262,7 @@ - match: { created: true } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "jira_watch_with_custom_field_one" body: > { @@ -277,7 +277,7 @@ - match: { watch_record.state: "executed" } - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "jira_watch_with_custom_field_two" body: > { @@ -318,7 +318,7 @@ - match: { created: true } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "jira_watch_with_custom_field_two" body: > { diff --git a/x-pack/qa/third-party/pagerduty/src/test/java/org/elasticsearch/smoketest/WatcherPagerDutyYamlTestSuiteIT.java b/x-pack/qa/third-party/pagerduty/src/test/java/org/elasticsearch/smoketest/WatcherPagerDutyYamlTestSuiteIT.java index 019609793e38c..e111bbd10696b 100644 --- a/x-pack/qa/third-party/pagerduty/src/test/java/org/elasticsearch/smoketest/WatcherPagerDutyYamlTestSuiteIT.java +++ b/x-pack/qa/third-party/pagerduty/src/test/java/org/elasticsearch/smoketest/WatcherPagerDutyYamlTestSuiteIT.java @@ -40,7 +40,7 @@ public void startWatcher() throws Exception { final List watcherTemplates = Arrays.asList(WatcherIndexTemplateRegistryField.TEMPLATE_NAMES); assertBusy(() -> { try { - getAdminExecutionContext().callApi("xpack.watcher.start", emptyMap(), emptyList(), emptyMap()); + getAdminExecutionContext().callApi("watcher.start", emptyMap(), emptyList(), emptyMap()); for (String template : watcherTemplates) { ClientYamlTestResponse templateExistsResponse = getAdminExecutionContext().callApi("indices.exists_template", @@ -49,7 +49,7 @@ public void startWatcher() throws Exception { } ClientYamlTestResponse response = - getAdminExecutionContext().callApi("xpack.watcher.stats", emptyMap(), emptyList(), emptyMap()); + getAdminExecutionContext().callApi("watcher.stats", emptyMap(), emptyList(), emptyMap()); String state = (String) response.evaluate("stats.0.watcher_state"); assertThat(state, is("started")); } catch (IOException e) { @@ -62,9 +62,9 @@ public void startWatcher() throws Exception { public void stopWatcher() throws Exception { assertBusy(() -> { try { - getAdminExecutionContext().callApi("xpack.watcher.stop", emptyMap(), emptyList(), emptyMap()); + getAdminExecutionContext().callApi("watcher.stop", emptyMap(), emptyList(), emptyMap()); ClientYamlTestResponse response = - getAdminExecutionContext().callApi("xpack.watcher.stats", emptyMap(), emptyList(), emptyMap()); + getAdminExecutionContext().callApi("watcher.stats", emptyMap(), emptyList(), emptyMap()); String state = (String) response.evaluate("stats.0.watcher_state"); assertThat(state, is("stopped")); } catch (IOException e) { diff --git a/x-pack/qa/third-party/pagerduty/src/test/resources/rest-api-spec/test/pagerduty/10_pagerduty.yml b/x-pack/qa/third-party/pagerduty/src/test/resources/rest-api-spec/test/pagerduty/10_pagerduty.yml index fa83c8e8e8ce1..82fb47e4bc14c 100644 --- a/x-pack/qa/third-party/pagerduty/src/test/resources/rest-api-spec/test/pagerduty/10_pagerduty.yml +++ b/x-pack/qa/third-party/pagerduty/src/test/resources/rest-api-spec/test/pagerduty/10_pagerduty.yml @@ -5,7 +5,7 @@ wait_for_status: yellow - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "pagerduty_watch" body: > { @@ -44,7 +44,7 @@ } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "pagerduty_watch" body: > { diff --git a/x-pack/qa/third-party/slack/src/test/java/org/elasticsearch/smoketest/WatcherSlackYamlTestSuiteIT.java b/x-pack/qa/third-party/slack/src/test/java/org/elasticsearch/smoketest/WatcherSlackYamlTestSuiteIT.java index f6e8222ea73a0..7021548109fd5 100644 --- a/x-pack/qa/third-party/slack/src/test/java/org/elasticsearch/smoketest/WatcherSlackYamlTestSuiteIT.java +++ b/x-pack/qa/third-party/slack/src/test/java/org/elasticsearch/smoketest/WatcherSlackYamlTestSuiteIT.java @@ -40,7 +40,7 @@ public void startWatcher() throws Exception { final List watcherTemplates = Arrays.asList(WatcherIndexTemplateRegistryField.TEMPLATE_NAMES); assertBusy(() -> { try { - getAdminExecutionContext().callApi("xpack.watcher.start", emptyMap(), emptyList(), emptyMap()); + getAdminExecutionContext().callApi("watcher.start", emptyMap(), emptyList(), emptyMap()); for (String template : watcherTemplates) { ClientYamlTestResponse templateExistsResponse = getAdminExecutionContext().callApi("indices.exists_template", @@ -49,7 +49,7 @@ public void startWatcher() throws Exception { } ClientYamlTestResponse response = - getAdminExecutionContext().callApi("xpack.watcher.stats", emptyMap(), emptyList(), emptyMap()); + getAdminExecutionContext().callApi("watcher.stats", emptyMap(), emptyList(), emptyMap()); String state = (String) response.evaluate("stats.0.watcher_state"); assertThat(state, is("started")); } catch (IOException e) { @@ -62,9 +62,9 @@ public void startWatcher() throws Exception { public void stopWatcher() throws Exception { assertBusy(() -> { try { - getAdminExecutionContext().callApi("xpack.watcher.stop", emptyMap(), emptyList(), emptyMap()); + getAdminExecutionContext().callApi("watcher.stop", emptyMap(), emptyList(), emptyMap()); ClientYamlTestResponse response = - getAdminExecutionContext().callApi("xpack.watcher.stats", emptyMap(), emptyList(), emptyMap()); + getAdminExecutionContext().callApi("watcher.stats", emptyMap(), emptyList(), emptyMap()); String state = (String) response.evaluate("stats.0.watcher_state"); assertThat(state, is("stopped")); } catch (IOException e) { diff --git a/x-pack/qa/third-party/slack/src/test/resources/rest-api-spec/test/slack/10_slack.yml b/x-pack/qa/third-party/slack/src/test/resources/rest-api-spec/test/slack/10_slack.yml index f5719ddbfc00c..6da232fc2ffb4 100644 --- a/x-pack/qa/third-party/slack/src/test/resources/rest-api-spec/test/slack/10_slack.yml +++ b/x-pack/qa/third-party/slack/src/test/resources/rest-api-spec/test/slack/10_slack.yml @@ -5,7 +5,7 @@ wait_for_status: yellow - do: - xpack.watcher.put_watch: + watcher.put_watch: id: "slack_watch" body: > { @@ -76,7 +76,7 @@ } - do: - xpack.watcher.execute_watch: + watcher.execute_watch: id: "slack_watch" body: > {