@@ -28,7 +28,6 @@ import (
2828 "github.com/cortexproject/cortex/pkg/util/services"
2929 cortex_testutil "github.com/cortexproject/cortex/pkg/util/testutil"
3030 "github.com/cortexproject/cortex/pkg/util/users"
31- "github.com/cortexproject/cortex/pkg/util/users/tenant"
3231)
3332
3433type testBlocksCleanerOptions struct {
@@ -165,15 +164,15 @@ func testBlocksCleanerWithOptions(t *testing.T, options testBlocksCleanerOptions
165164 createDeletionMark (t , bucketClient , "user-2" , block7 , now .Add (- deletionDelay ).Add (- time .Hour )) // Block reached the deletion threshold.
166165
167166 // Blocks for user-3, tenant marked for deletion.
168- require .NoError (t , tenant .WriteTenantDeletionMark (context .Background (), bucketClient , "user-3" , tenant .NewTenantDeletionMark (time .Now ())))
167+ require .NoError (t , users .WriteTenantDeletionMark (context .Background (), bucketClient , "user-3" , users .NewTenantDeletionMark (time .Now ())))
169168 block9 := createTSDBBlock (t , bucketClient , "user-3" , 10 , 30 , nil )
170169 block10 := createTSDBBlock (t , bucketClient , "user-3" , 30 , 50 , nil )
171170 createParquetMarker (t , bucketClient , "user-3" , block10 )
172171
173172 // User-4 with no more blocks, but couple of mark and debug files. Should be fully deleted.
174- user4Mark := tenant .NewTenantDeletionMark (time .Now ())
173+ user4Mark := users .NewTenantDeletionMark (time .Now ())
175174 user4Mark .FinishedTime = time .Now ().Unix () - 60 // Set to check final user cleanup.
176- require .NoError (t , tenant .WriteTenantDeletionMark (context .Background (), bucketClient , "user-4" , user4Mark ))
175+ require .NoError (t , users .WriteTenantDeletionMark (context .Background (), bucketClient , "user-4" , user4Mark ))
177176 user4DebugMetaFile := path .Join ("user-4" , block .DebugMetas , "meta.json" )
178177 require .NoError (t , bucketClient .Upload (context .Background (), user4DebugMetaFile , strings .NewReader ("some random content here" )))
179178
@@ -271,7 +270,7 @@ func testBlocksCleanerWithOptions(t *testing.T, options testBlocksCleanerOptions
271270 {"user-3" , true },
272271 {"user-4" , options .user4FilesExist },
273272 } {
274- exists , err := tenant .TenantDeletionMarkExists (ctx , bucketClient , tc .user )
273+ exists , err := users .TenantDeletionMarkExists (ctx , bucketClient , tc .user )
275274 require .NoError (t , err )
276275 assert .Equal (t , tc .expectedExists , exists , tc .user )
277276 }
0 commit comments