From 903305284dcf98118c0e05c799fb35818e292dbe Mon Sep 17 00:00:00 2001 From: Tanguy Leroux Date: Thu, 19 Dec 2019 17:50:59 +0100 Subject: [PATCH] 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 --- .../test/repository_azure/10_repository.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/plugins/repository-azure/qa/microsoft-azure-storage/src/test/resources/rest-api-spec/test/repository_azure/10_repository.yml b/plugins/repository-azure/qa/microsoft-azure-storage/src/test/resources/rest-api-spec/test/repository_azure/10_repository.yml index 92866190959..650d5c44741 100644 --- a/plugins/repository-azure/qa/microsoft-azure-storage/src/test/resources/rest-api-spec/test/repository_azure/10_repository.yml +++ b/plugins/repository-azure/qa/microsoft-azure-storage/src/test/resources/rest-api-spec/test/repository_azure/10_repository.yml @@ -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":