Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyaug committed Oct 4, 2023
1 parent bdea6c5 commit ccac4d2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/graveler/branch/protection_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/go-openapi/swag"
"github.com/go-test/deep"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"github.com/treeverse/lakefs/pkg/graveler"
"github.com/treeverse/lakefs/pkg/graveler/branch"
"github.com/treeverse/lakefs/pkg/graveler/mock"
Expand All @@ -29,10 +30,7 @@ func TestSetAndGet(t *testing.T) {
ctx := context.Background()
bpm := prepareTest(t, ctx)
rules, eTag, err := bpm.GetRules(ctx, repository)
testutil.Must(t, err)
if len(rules.BranchPatternToBlockedActions) != 0 {
t.Fatalf("expected no rules, got %d rules", len(rules.BranchPatternToBlockedActions))
}
require.ErrorIs(t, err, graveler.ErrNotFound)
testutil.Must(t, bpm.SetRules(ctx, repository, &graveler.BranchProtectionRules{
BranchPatternToBlockedActions: map[string]*graveler.BranchProtectionBlockedActions{
"main*": {Value: []graveler.BranchProtectionBlockedAction{
Expand Down

0 comments on commit ccac4d2

Please sign in to comment.