Remove snapshots left by previous tests failures (#50380)

When a third party test failed, it potentially left some snapshots 
in the repository. In case of tests running against an external 
service like Azure, the remaining snapshots can fail the future 
test executions are they are not supposed to exist.

Similarly to what has been done for S3 and GCS, this commit 
cleans up remaining snapshots before the test execution.

Closes #50304
This commit is contained in:
Tanguy Leroux 2019-12-19 17:50:59 +01:00
parent 1a2e931d6e
commit 903305284d
1 changed files with 13 additions and 0 deletions

View File

@ -13,6 +13,19 @@ setup:
client: "integration_test"
base_path: ${base_path}
# Remove the snapshots, if a previous test failed to delete them. This is
# useful for third party tests that runs the test against a real external service.
- do:
snapshot.delete:
repository: repository
snapshot: snapshot-one
ignore: 404
- do:
snapshot.delete:
repository: repository
snapshot: snapshot-two
ignore: 404
---
"Snapshot/Restore with repository-azure":