Skip to content

Commit

Permalink
[Test] Clean up some repository-s3 tests (#31601)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tlrx committed Jun 29, 2018
1 parent 49df3eb commit cdc340f
Show file tree
Hide file tree
Showing 12 changed files with 228 additions and 820 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,3 +238,30 @@ teardown:
repository: repository-file
snapshot: snapshot-one

---
"Get a non existing snapshot":

- do:
catch: /snapshot_missing_exception/
snapshot.get:
repository: repository-url
snapshot: missing

---
"Delete a non existing snapshot":

- do:
catch: /snapshot_missing_exception/
snapshot.delete:
repository: repository-url
snapshot: missing

---
"Restore a non existing snapshot":

- do:
catch: /snapshot_restore_exception/
snapshot.restore:
repository: repository-url
snapshot: missing
wait_for_completion: true
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Integration tests for repository-azure
---
"Snapshot/Restore with repository-azure":
setup:

# Register repository
- do:
Expand All @@ -13,7 +13,8 @@
client: "integration_test"
base_path: ${base_path}

- match: { acknowledged: true }
---
"Snapshot/Restore with repository-azure":

# Get repository
- do:
Expand Down Expand Up @@ -172,3 +173,66 @@
repository: repository
snapshot: snapshot-one
master_timeout: 5m

---
"Register a repository with a non existing container":

- do:
catch: /repository_verification_exception/
snapshot.create_repository:
repository: repository
body:
type: azure
settings:
container: zHHkfSqlbnBsbpSgvCYtxrEfFLqghXtyPvvvKPNBnRCicNHQLE
client: integration_test

---
"Register a repository with a non existing client":

- do:
# TODO this should be a repository_exception
catch: /settings_exception/
snapshot.create_repository:
repository: repository
body:
type: azure
settings:
bucket: repository
client: unknown

---
"Get a non existing snapshot":

- do:
catch: /snapshot_missing_exception/
snapshot.get:
repository: repository
snapshot: missing

---
"Delete a non existing snapshot":

- do:
catch: /snapshot_missing_exception/
snapshot.delete:
repository: repository
snapshot: missing

---
"Restore a non existing snapshot":

- do:
catch: /snapshot_restore_exception/
snapshot.restore:
repository: repository
snapshot: missing
wait_for_completion: true

---
teardown:

# Remove our repository
- do:
snapshot.delete_repository:
repository: repository
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Integration tests for repository-gcs
---
"Snapshot/Restore with repository-gcs":
setup:

# Register repository
- do:
Expand All @@ -13,7 +13,8 @@
client: "integration_test"
base_path: ${base_path}

- match: { acknowledged: true }
---
"Snapshot/Restore with repository-gcs":

# Get repository
- do:
Expand Down Expand Up @@ -171,6 +172,63 @@
repository: repository
snapshot: snapshot-one

---
"Register a repository with a non existing bucket":

- do:
catch: /repository_exception/
snapshot.create_repository:
repository: repository
body:
type: gcs
settings:
bucket: zHHkfSqlbnBsbpSgvCYtxrEfFLqghXtyPvvvKPNBnRCicNHQLE
client: integration_test

---
"Register a repository with a non existing client":

- do:
catch: /repository_exception/
snapshot.create_repository:
repository: repository
body:
type: gcs
settings:
bucket: repository
client: unknown

---
"Get a non existing snapshot":

- do:
catch: /snapshot_missing_exception/
snapshot.get:
repository: repository
snapshot: missing

---
"Delete a non existing snapshot":

- do:
catch: /snapshot_missing_exception/
snapshot.delete:
repository: repository
snapshot: missing

---
"Restore a non existing snapshot":

- do:
catch: /snapshot_restore_exception/
snapshot.restore:
repository: repository
snapshot: missing
wait_for_completion: true

---
teardown:

# Remove our repository
- do:
snapshot.delete_repository:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Integration tests for repository-s3

---
"Snapshot/Restore with repository-s3":
setup:

# Register repository
- do:
Expand All @@ -15,7 +16,8 @@
canned_acl: private
storage_class: standard

- match: { acknowledged: true }
---
"Snapshot/Restore with repository-s3":

# Get repository
- do:
Expand Down Expand Up @@ -177,6 +179,63 @@
repository: repository
snapshot: snapshot-one

---
"Register a repository with a non existing bucket":

- do:
catch: /repository_exception/
snapshot.create_repository:
repository: repository
body:
type: s3
settings:
bucket: zHHkfSqlbnBsbpSgvCYtxrEfFLqghXtyPvvvKPNBnRCicNHQLE
client: integration_test

---
"Register a repository with a non existing client":

- do:
catch: /repository_exception/
snapshot.create_repository:
repository: repository
body:
type: s3
settings:
bucket: repository
client: unknown

---
"Get a non existing snapshot":

- do:
catch: /snapshot_missing_exception/
snapshot.get:
repository: repository
snapshot: missing

---
"Delete a non existing snapshot":

- do:
catch: /snapshot_missing_exception/
snapshot.delete:
repository: repository
snapshot: missing

---
"Restore a non existing snapshot":

- do:
catch: /snapshot_restore_exception/
snapshot.restore:
repository: repository
snapshot: missing
wait_for_completion: true

---
teardown:

# Remove our repository
- do:
snapshot.delete_repository:
Expand Down

This file was deleted.

Loading

0 comments on commit cdc340f

Please sign in to comment.