From 5f38b486c625c61abd3aa5a5ccbca313bb2b1a49 Mon Sep 17 00:00:00 2001 From: Suhaib <93185683+suhaib-mousa@users.noreply.github.com> Date: Mon, 27 Jan 2025 20:46:21 +0300 Subject: [PATCH] fix unit test --- .../Bunny/AbpBlobStoringBunnyTestModule.cs | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/framework/test/Volo.Abp.BlobStoring.Bunny.Tests/Volo/Abp/BlobStoring/Bunny/AbpBlobStoringBunnyTestModule.cs b/framework/test/Volo.Abp.BlobStoring.Bunny.Tests/Volo/Abp/BlobStoring/Bunny/AbpBlobStoringBunnyTestModule.cs index 3e79ad0faa..73066291ed 100644 --- a/framework/test/Volo.Abp.BlobStoring.Bunny.Tests/Volo/Abp/BlobStoring/Bunny/AbpBlobStoringBunnyTestModule.cs +++ b/framework/test/Volo.Abp.BlobStoring.Bunny.Tests/Volo/Abp/BlobStoring/Bunny/AbpBlobStoringBunnyTestModule.cs @@ -2,6 +2,7 @@ using System.Threading.Tasks; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; +using NSubstitute.Extensions; using Volo.Abp.Modularity; using Volo.Abp.Threading; @@ -56,18 +57,4 @@ public class AbpBlobStoringBunnyTestModule : AbpModule }); }); } - - public override void OnApplicationShutdown(ApplicationShutdownContext context) - { - AsyncHelper.RunSync(() => DeleteStorageZoneAsync(context)); - } - - private async Task DeleteStorageZoneAsync(ApplicationShutdownContext context) - { - var bunnyClient = new BunnyClient(_configuration.AccessKey, _configuration.ContainerName, _configuration.Region); - if (await bunnyClient.DoesStorageZoneExistAsync(_randomContainerName)) - { - await bunnyClient.DeleteStorageZoneAsync(_randomContainerName); - } - } }