Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: bcmmbaga <[email protected]>
  • Loading branch information
bcmmbaga committed Nov 27, 2024
1 parent 3186876 commit 91b97d6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions management/server/group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ func TestDefaultAccountManager_DeleteGroup(t *testing.T) {
}

func TestDefaultAccountManager_DeleteGroups(t *testing.T) {
t.Setenv("NETBIRD_STORE_ENGINE", string(PostgresStoreEngine))

am, err := createManager(t)
assert.NoError(t, err, "Failed to create account manager")

Expand Down Expand Up @@ -389,7 +391,7 @@ func initTestGroupAccount(am *DefaultAccountManager) (*DefaultAccountManager, *A
return nil, nil, err
}

err = am.Store.SavePolicy(context.Background(), LockingStrengthUpdate, policy)
err = am.Store.CreatePolicy(context.Background(), LockingStrengthUpdate, policy)
if err != nil {
return nil, nil, err
}
Expand All @@ -406,7 +408,7 @@ func initTestGroupAccount(am *DefaultAccountManager) (*DefaultAccountManager, *A

err = am.SaveGroups(context.Background(), accountID, groupAdminUserID, []*nbgroup.Group{
groupForRoute, groupForRoute2, groupForNameServerGroups, groupForPolicies,
groupForSetupKeys, groupForUsers, groupForUsers, groupForIntegration,
groupForSetupKeys, groupForUsers, groupForIntegration,
})
if err != nil {
return nil, nil, err
Expand Down

0 comments on commit 91b97d6

Please sign in to comment.