From 844ca601cd39706c32ed2b6b42a6f17fc1113c0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9F=8C=B2=20Harry=20=F0=9F=8C=8A=20John=20=F0=9F=8F=94?= Date: Sun, 3 Dec 2023 23:05:35 -0800 Subject: [PATCH] Fix tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 🌲 Harry 🌊 John 🏔 --- pkg/querier/blocks_finder_bucket_scan_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/querier/blocks_finder_bucket_scan_test.go b/pkg/querier/blocks_finder_bucket_scan_test.go index 11e3cef206f..b502c8eed20 100644 --- a/pkg/querier/blocks_finder_bucket_scan_test.go +++ b/pkg/querier/blocks_finder_bucket_scan_test.go @@ -94,7 +94,7 @@ func TestBucketScanBlocksFinder_InitialScanFailure(t *testing.T) { // Mock the storage to simulate a failure when reading objects. bucket.MockIter("", []string{"user-1"}, nil) - bucket.MockIter("__markers__", []string{""}, nil) + bucket.MockIter("__markers__", []string{}, nil) bucket.MockIter("user-1/", []string{"user-1/01DTVP434PA9VFXSW2JKB3392D/meta.json"}, nil) bucket.MockExists(cortex_tsdb.GetGlobalDeletionMarkPath("user-1"), false, nil) bucket.MockExists(cortex_tsdb.GetLocalDeletionMarkPath("user-1"), false, nil) @@ -140,7 +140,7 @@ func TestBucketScanBlocksFinder_StopWhileRunningTheInitialScanOnManyTenants(t *t // Mock the bucket to introduce a 1s sleep while iterating each tenant in the bucket. bucket := &bucket.ClientMock{} bucket.MockIter("", tenantIDs, nil) - bucket.MockIter("__markers__", []string{""}, nil) + bucket.MockIter("__markers__", []string{}, nil) for _, tenantID := range tenantIDs { bucket.MockIterWithCallback(tenantID+"/", []string{}, nil, func() { time.Sleep(time.Second) @@ -179,7 +179,7 @@ func TestBucketScanBlocksFinder_StopWhileRunningTheInitialScanOnManyBlocks(t *te // Mock the bucket to introduce a 1s sleep while syncing each block in the bucket. bucket := &bucket.ClientMock{} bucket.MockIter("", []string{"user-1"}, nil) - bucket.MockIter("__markers__", []string{""}, nil) + bucket.MockIter("__markers__", []string{}, nil) bucket.MockIter("user-1/", blockPaths, nil) bucket.On("Exists", mock.Anything, mock.Anything).Return(false, nil).Run(func(args mock.Arguments) { // We return the meta.json doesn't exist, but introduce a 1s delay for each call.