Skip to content

Commit

Permalink
update tests for new interface
Browse files Browse the repository at this point in the history
  • Loading branch information
macneale4 committed Feb 24, 2025
1 parent 3f5a599 commit 10656fe
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions go/store/nbs/root_tracker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -631,8 +631,13 @@ func (ftp fakeTablePersister) Open(ctx context.Context, name hash.Hash, chunkCou
return chunkSourceAdapter{cs, name}, nil
}

func (ftp fakeTablePersister) Exists(ctx context.Context, name hash.Hash, chunkCount uint32, stats *Stats) (bool, error) {
if _, ok := ftp.sourcesToFail[name]; ok {
func (ftp fakeTablePersister) Exists(ctx context.Context, name string, chunkCount uint32, stats *Stats) (bool, error) {
h, ok := hash.MaybeParse(name)
if !ok {
panic("object store name expected to be a hash in test")
}

if _, ok := ftp.sourcesToFail[h]; ok {
return false, errors.New("intentional failure")
}
return true, nil
Expand Down

0 comments on commit 10656fe

Please # to comment.