Skip to content

Commit

Permalink
Handle V2 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
itaigilo committed Feb 24, 2025
1 parent 78f99e3 commit d5645d0
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 35 deletions.
6 changes: 3 additions & 3 deletions pkg/graveler/committed/meta_range_writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func TestWriter_WriteRecords(t *testing.T) {

rangeManagerMeta := mock.NewMockRangeManager(ctrl)
rangeManagerMeta.EXPECT().GetWriter(gomock.Any(), gomock.Any(), gomock.Any()).Return(fakeMetaWriter, nil)
storageID := committed.StorageID("")
storageID := committed.StorageID("sid")
namespace := committed.Namespace("ns")
w := committed.NewGeneralMetaRangeWriter(ctx, rangeManager, rangeManagerMeta, &params, storageID, namespace, nil)

Expand Down Expand Up @@ -102,7 +102,7 @@ func TestWriter_OverlappingRanges(t *testing.T) {
defer ctrl.Finish()

rangeManager := mock.NewMockRangeManager(ctrl)
storageID := committed.StorageID("")
storageID := committed.StorageID("sid")
namespace := committed.Namespace("ns")
rng := committed.Range{MinKey: committed.Key("a"), MaxKey: committed.Key("g")}
rng2 := committed.Range{MinKey: committed.Key("c"), MaxKey: committed.Key("l")}
Expand Down Expand Up @@ -133,7 +133,7 @@ func TestWriter_RecordRangeAndClose(t *testing.T) {
rangeManagerMeta := mock.NewMockRangeManager(ctrl)
fakeMetaWriter := NewFakeRangeWriter(&committed.WriteResult{}, nil)

storageID := committed.StorageID("")
storageID := committed.StorageID("sid")
namespace := committed.Namespace("ns")
record := graveler.ValueRecord{Key: nil, Value: &graveler.Value{}}
rng := committed.Range{ID: "rng2-id", MinKey: committed.Key("a"), MaxKey: committed.Key("g"), Count: 4}
Expand Down
1 change: 1 addition & 0 deletions pkg/graveler/graveler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1365,6 +1365,7 @@ func TestGraveler_CreateBranch(t *testing.T) {
func TestGraveler_UpdateBranch(t *testing.T) {
gravel := newGraveler(t, nil, &testutil.StagingFake{ValueIterator: testutil.NewValueIteratorFake([]graveler.ValueRecord{{Key: graveler.Key("foo/one"), Value: &graveler.Value{}}})},
&testutil.RefsFake{Branch: &graveler.Branch{}, UpdateErr: kv.ErrPredicateFailed}, nil, nil)
testutil.ShortenBranchUpdateBackOff(gravel.(*graveler.Graveler))
_, err := gravel.UpdateBranch(context.Background(), repository, "", "")
require.ErrorIs(t, err, graveler.ErrTooManyTries)

Expand Down
Loading

0 comments on commit d5645d0

Please sign in to comment.