@@ -28,7 +28,6 @@ import (
28
28
"github.com/cortexproject/cortex/pkg/util/services"
29
29
cortex_testutil "github.com/cortexproject/cortex/pkg/util/testutil"
30
30
"github.com/cortexproject/cortex/pkg/util/users"
31
- "github.com/cortexproject/cortex/pkg/util/users/tenant"
32
31
)
33
32
34
33
type testBlocksCleanerOptions struct {
@@ -165,15 +164,15 @@ func testBlocksCleanerWithOptions(t *testing.T, options testBlocksCleanerOptions
165
164
createDeletionMark (t , bucketClient , "user-2" , block7 , now .Add (- deletionDelay ).Add (- time .Hour )) // Block reached the deletion threshold.
166
165
167
166
// 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 ())))
169
168
block9 := createTSDBBlock (t , bucketClient , "user-3" , 10 , 30 , nil )
170
169
block10 := createTSDBBlock (t , bucketClient , "user-3" , 30 , 50 , nil )
171
170
createParquetMarker (t , bucketClient , "user-3" , block10 )
172
171
173
172
// 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 ())
175
174
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 ))
177
176
user4DebugMetaFile := path .Join ("user-4" , block .DebugMetas , "meta.json" )
178
177
require .NoError (t , bucketClient .Upload (context .Background (), user4DebugMetaFile , strings .NewReader ("some random content here" )))
179
178
@@ -271,7 +270,7 @@ func testBlocksCleanerWithOptions(t *testing.T, options testBlocksCleanerOptions
271
270
{"user-3" , true },
272
271
{"user-4" , options .user4FilesExist },
273
272
} {
274
- exists , err := tenant .TenantDeletionMarkExists (ctx , bucketClient , tc .user )
273
+ exists , err := users .TenantDeletionMarkExists (ctx , bucketClient , tc .user )
275
274
require .NoError (t , err )
276
275
assert .Equal (t , tc .expectedExists , exists , tc .user )
277
276
}
0 commit comments