From 1e250cd90a79902f954740a71f1144039676027b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arpad=20M=C3=BCller?= Date: Mon, 23 Oct 2023 20:08:56 +0200 Subject: [PATCH] Cleanup in azure_upload_download_works test (#5636) The `azure_upload_download_works` test is not cleaning up after itself, leaving behind the files it is uploading. I found these files when looking at the contents of the bucket in #5627. We now clean up the file we uploaded before, like the other tests do it as well. Follow-up of #5546 --- libs/remote_storage/tests/test_real_azure.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libs/remote_storage/tests/test_real_azure.rs b/libs/remote_storage/tests/test_real_azure.rs index 5ebbd9e95b..0338270aaf 100644 --- a/libs/remote_storage/tests/test_real_azure.rs +++ b/libs/remote_storage/tests/test_real_azure.rs @@ -267,6 +267,12 @@ async fn azure_upload_download_works(ctx: &mut MaybeEnabledAzure) -> anyhow::Res let buf = download_and_compare(dl).await?; assert_eq!(buf, data); + debug!("Cleanup: deleting file at path {path:?}"); + ctx.client + .delete(&path) + .await + .with_context(|| format!("{path:?} removal"))?; + Ok(()) }