From 5f2853242341ef510a0a5897b2c1788ef97303b0 Mon Sep 17 00:00:00 2001 From: Moraxyc Date: Thu, 9 May 2024 14:22:19 +0800 Subject: [PATCH] fix(test): ensure `setupStorages` is executed once (#6422) In TestGetStorageVirtualFilesByPath() and TestGetBalancedStorage(), setupStorages() was being called twice, leading to a "UNIQUE constraint failed" error. --- internal/op/storage_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/op/storage_test.go b/internal/op/storage_test.go index f3d0b4e64b7..fddf2bb11e3 100644 --- a/internal/op/storage_test.go +++ b/internal/op/storage_test.go @@ -60,7 +60,6 @@ func TestGetStorageVirtualFilesByPath(t *testing.T) { } func TestGetBalancedStorage(t *testing.T) { - setupStorages(t) set := mapset.NewSet[string]() for i := 0; i < 5; i++ { storage := op.GetBalancedStorage("/a/d/e1")