MCPcopy Create free account
hub / github.com/cortexproject/cortex / TestReadUserIndex_NotFound

Function TestReadUserIndex_NotFound

pkg/util/users/index_test.go:54–64  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

52}
53
54func TestReadUserIndex_NotFound(t *testing.T) {
55 t.Parallel()
56
57 ctx := context.Background()
58 bkt, _ := cortex_testutil.PrepareFilesystemBucket(t)
59
60 // Test reading non-existent index
61 _, err := ReadUserIndex(ctx, bkt, log.NewNopLogger())
62 require.Error(t, err)
63 assert.Equal(t, ErrIndexNotFound, err)
64}
65
66func TestReadUserIndex_Corrupted(t *testing.T) {
67 t.Parallel()

Callers

nothing calls this directly

Calls 3

ReadUserIndexFunction · 0.85
EqualMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected