Skip to content

Commit cdc340f

Browse files
committed
[Test] Clean up some repository-s3 tests (#31601)
This commit removes some tests in the repository-s3 plugin that have not been executed for 2+ years but have been maintained for nothing. Most of the tests in AbstractAwsTestCase were obsolete or superseded by fixture based integration tests.
1 parent 49df3eb commit cdc340f

File tree

12 files changed

+228
-820
lines changed

12 files changed

+228
-820
lines changed

modules/repository-url/src/test/resources/rest-api-spec/test/repository_url/10_basic.yml

+27
Original file line numberDiff line numberDiff line change
@@ -238,3 +238,30 @@ teardown:
238238
repository: repository-file
239239
snapshot: snapshot-one
240240

241+
---
242+
"Get a non existing snapshot":
243+
244+
- do:
245+
catch: /snapshot_missing_exception/
246+
snapshot.get:
247+
repository: repository-url
248+
snapshot: missing
249+
250+
---
251+
"Delete a non existing snapshot":
252+
253+
- do:
254+
catch: /snapshot_missing_exception/
255+
snapshot.delete:
256+
repository: repository-url
257+
snapshot: missing
258+
259+
---
260+
"Restore a non existing snapshot":
261+
262+
- do:
263+
catch: /snapshot_restore_exception/
264+
snapshot.restore:
265+
repository: repository-url
266+
snapshot: missing
267+
wait_for_completion: true

plugins/repository-azure/qa/microsoft-azure-storage/src/test/resources/rest-api-spec/test/repository_azure/10_repository.yml

+66-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Integration tests for repository-azure
22
---
3-
"Snapshot/Restore with repository-azure":
3+
setup:
44

55
# Register repository
66
- do:
@@ -13,7 +13,8 @@
1313
client: "integration_test"
1414
base_path: ${base_path}
1515

16-
- match: { acknowledged: true }
16+
---
17+
"Snapshot/Restore with repository-azure":
1718

1819
# Get repository
1920
- do:
@@ -172,3 +173,66 @@
172173
repository: repository
173174
snapshot: snapshot-one
174175
master_timeout: 5m
176+
177+
---
178+
"Register a repository with a non existing container":
179+
180+
- do:
181+
catch: /repository_verification_exception/
182+
snapshot.create_repository:
183+
repository: repository
184+
body:
185+
type: azure
186+
settings:
187+
container: zHHkfSqlbnBsbpSgvCYtxrEfFLqghXtyPvvvKPNBnRCicNHQLE
188+
client: integration_test
189+
190+
---
191+
"Register a repository with a non existing client":
192+
193+
- do:
194+
# TODO this should be a repository_exception
195+
catch: /settings_exception/
196+
snapshot.create_repository:
197+
repository: repository
198+
body:
199+
type: azure
200+
settings:
201+
bucket: repository
202+
client: unknown
203+
204+
---
205+
"Get a non existing snapshot":
206+
207+
- do:
208+
catch: /snapshot_missing_exception/
209+
snapshot.get:
210+
repository: repository
211+
snapshot: missing
212+
213+
---
214+
"Delete a non existing snapshot":
215+
216+
- do:
217+
catch: /snapshot_missing_exception/
218+
snapshot.delete:
219+
repository: repository
220+
snapshot: missing
221+
222+
---
223+
"Restore a non existing snapshot":
224+
225+
- do:
226+
catch: /snapshot_restore_exception/
227+
snapshot.restore:
228+
repository: repository
229+
snapshot: missing
230+
wait_for_completion: true
231+
232+
---
233+
teardown:
234+
235+
# Remove our repository
236+
- do:
237+
snapshot.delete_repository:
238+
repository: repository

plugins/repository-gcs/qa/google-cloud-storage/src/test/resources/rest-api-spec/test/repository_gcs/10_repository.yml

+60-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Integration tests for repository-gcs
22
---
3-
"Snapshot/Restore with repository-gcs":
3+
setup:
44

55
# Register repository
66
- do:
@@ -13,7 +13,8 @@
1313
client: "integration_test"
1414
base_path: ${base_path}
1515

16-
- match: { acknowledged: true }
16+
---
17+
"Snapshot/Restore with repository-gcs":
1718

1819
# Get repository
1920
- do:
@@ -171,6 +172,63 @@
171172
repository: repository
172173
snapshot: snapshot-one
173174

175+
---
176+
"Register a repository with a non existing bucket":
177+
178+
- do:
179+
catch: /repository_exception/
180+
snapshot.create_repository:
181+
repository: repository
182+
body:
183+
type: gcs
184+
settings:
185+
bucket: zHHkfSqlbnBsbpSgvCYtxrEfFLqghXtyPvvvKPNBnRCicNHQLE
186+
client: integration_test
187+
188+
---
189+
"Register a repository with a non existing client":
190+
191+
- do:
192+
catch: /repository_exception/
193+
snapshot.create_repository:
194+
repository: repository
195+
body:
196+
type: gcs
197+
settings:
198+
bucket: repository
199+
client: unknown
200+
201+
---
202+
"Get a non existing snapshot":
203+
204+
- do:
205+
catch: /snapshot_missing_exception/
206+
snapshot.get:
207+
repository: repository
208+
snapshot: missing
209+
210+
---
211+
"Delete a non existing snapshot":
212+
213+
- do:
214+
catch: /snapshot_missing_exception/
215+
snapshot.delete:
216+
repository: repository
217+
snapshot: missing
218+
219+
---
220+
"Restore a non existing snapshot":
221+
222+
- do:
223+
catch: /snapshot_restore_exception/
224+
snapshot.restore:
225+
repository: repository
226+
snapshot: missing
227+
wait_for_completion: true
228+
229+
---
230+
teardown:
231+
174232
# Remove our repository
175233
- do:
176234
snapshot.delete_repository:

plugins/repository-s3/qa/amazon-s3/src/test/resources/rest-api-spec/test/repository_s3/10_repository.yml

+61-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Integration tests for repository-s3
2+
23
---
3-
"Snapshot/Restore with repository-s3":
4+
setup:
45

56
# Register repository
67
- do:
@@ -15,7 +16,8 @@
1516
canned_acl: private
1617
storage_class: standard
1718

18-
- match: { acknowledged: true }
19+
---
20+
"Snapshot/Restore with repository-s3":
1921

2022
# Get repository
2123
- do:
@@ -177,6 +179,63 @@
177179
repository: repository
178180
snapshot: snapshot-one
179181

182+
---
183+
"Register a repository with a non existing bucket":
184+
185+
- do:
186+
catch: /repository_exception/
187+
snapshot.create_repository:
188+
repository: repository
189+
body:
190+
type: s3
191+
settings:
192+
bucket: zHHkfSqlbnBsbpSgvCYtxrEfFLqghXtyPvvvKPNBnRCicNHQLE
193+
client: integration_test
194+
195+
---
196+
"Register a repository with a non existing client":
197+
198+
- do:
199+
catch: /repository_exception/
200+
snapshot.create_repository:
201+
repository: repository
202+
body:
203+
type: s3
204+
settings:
205+
bucket: repository
206+
client: unknown
207+
208+
---
209+
"Get a non existing snapshot":
210+
211+
- do:
212+
catch: /snapshot_missing_exception/
213+
snapshot.get:
214+
repository: repository
215+
snapshot: missing
216+
217+
---
218+
"Delete a non existing snapshot":
219+
220+
- do:
221+
catch: /snapshot_missing_exception/
222+
snapshot.delete:
223+
repository: repository
224+
snapshot: missing
225+
226+
---
227+
"Restore a non existing snapshot":
228+
229+
- do:
230+
catch: /snapshot_restore_exception/
231+
snapshot.restore:
232+
repository: repository
233+
snapshot: missing
234+
wait_for_completion: true
235+
236+
---
237+
teardown:
238+
180239
# Remove our repository
181240
- do:
182241
snapshot.delete_repository:

plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/AbstractAwsTestCase.java

-74
This file was deleted.

0 commit comments

Comments
 (0)