From 91b97d60f58bd61f3519e7c6363e76ec79916985 Mon Sep 17 00:00:00 2001 From: bcmmbaga Date: Wed, 27 Nov 2024 12:41:31 +0300 Subject: [PATCH] Fix tests Signed-off-by: bcmmbaga --- management/server/group_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/management/server/group_test.go b/management/server/group_test.go index a4a85876d0e..0db9318ee1a 100644 --- a/management/server/group_test.go +++ b/management/server/group_test.go @@ -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") @@ -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 } @@ -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