From 541896e5ebc33c06cf7a8b4cd15be84b6c8a776f Mon Sep 17 00:00:00 2001 From: Finn Carroll Date: Tue, 7 Jan 2025 13:38:03 -0800 Subject: [PATCH] Add _cat/snapshots deprecation warning rest test. Signed-off-by: Finn Carroll --- .../test/cat.snapshots/10_basic.yml | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/cat.snapshots/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/cat.snapshots/10_basic.yml index 6e03ceb98c716..29b4b8f5c1889 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/cat.snapshots/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/cat.snapshots/10_basic.yml @@ -77,3 +77,28 @@ /^ snap1\s+ SUCCESS\s+ \d+\s+ \d\d\:\d\d\:\d\d\s+ \d+\s+ \d\d\:\d\d\:\d\d\s+ \S+\s+ 2\s+ 2\s+ 0\s+ 2\s*\n snap2\s+ SUCCESS\s+ \d+\s+ \d\d\:\d\d\:\d\d\s+ \d+\s+ \d\d\:\d\d\:\d\d\s+ \S+\s+ 2\s+ 2\s+ 0\s+ 2\s*\n $/ + +--- +"Test deprecated _cat/snapshots endpoint": + - skip: + version: " - 2.18.99" + reason: "Deprecation added in 2.19" + features: [ "warnings" ] + + - do: + snapshot.create_repository: + repository: dep_test_repo + body: + type: fs + settings: + location: "dep_test_repo_loc" + + - do: + warnings: + - "[/_cat/snapshots] is a deprecated endpoint. Please use [/_cat/snapshots/{repository}] instead." + cat.snapshots: + q: "repository:dep_test_repo" + + - match: + $body: | + /^$/