Do not through missing-permission error when no store on /api/v1/stores (Close #4735) (#4748)

This commit is contained in:
Nicolas Dorier
2023-03-08 21:36:51 +09:00
committed by GitHub
parent 7b5ce8f70c
commit 98d62e826b
6 changed files with 20 additions and 12 deletions

View File

@@ -246,15 +246,18 @@ namespace BTCPayServer.Tests
}
public List<string> Stores { get; internal set; } = new List<string>();
public bool DeleteStore { get; set; } = true;
public void Dispose()
{
foreach (var r in this.Resources)
r.Dispose();
TestLogs.LogInformation("Disposing the BTCPayTester...");
foreach (var store in Stores)
if (DeleteStore)
{
Xunit.Assert.True(PayTester.StoreRepository.DeleteStore(store).GetAwaiter().GetResult());
foreach (var store in Stores)
{
Xunit.Assert.True(PayTester.StoreRepository.DeleteStore(store).GetAwaiter().GetResult());
}
}
if (PayTester != null)
PayTester.Dispose();