Make test compile

This commit is contained in:
braginini
2022-12-22 11:54:26 +01:00
parent a32bc441d2
commit 359b2a13a7
8 changed files with 65 additions and 34 deletions

View File

@@ -20,7 +20,7 @@ func TestDefaultAccountManager_SaveSetupKey(t *testing.T) {
t.Fatal(err)
}
err = manager.SaveGroup(account.Id, &Group{
err = manager.SaveGroup(account.Id, userID, &Group{
ID: "group_1",
Name: "group_name_1",
Peers: []string{},
@@ -33,7 +33,7 @@ func TestDefaultAccountManager_SaveSetupKey(t *testing.T) {
keyName := "my-test-key"
key, err := manager.CreateSetupKey(account.Id, keyName, SetupKeyReusable, expiresIn, []string{},
SetupKeyUnlimitedUsage)
SetupKeyUnlimitedUsage, userID)
if err != nil {
t.Fatal(err)
}
@@ -46,7 +46,7 @@ func TestDefaultAccountManager_SaveSetupKey(t *testing.T) {
Name: newKeyName,
Revoked: revoked,
AutoGroups: autoGroups,
})
}, userID)
if err != nil {
t.Fatal(err)
}
@@ -67,7 +67,7 @@ func TestDefaultAccountManager_CreateSetupKey(t *testing.T) {
t.Fatal(err)
}
err = manager.SaveGroup(account.Id, &Group{
err = manager.SaveGroup(account.Id, userID, &Group{
ID: "group_1",
Name: "group_name_1",
Peers: []string{},
@@ -76,7 +76,7 @@ func TestDefaultAccountManager_CreateSetupKey(t *testing.T) {
t.Fatal(err)
}
err = manager.SaveGroup(account.Id, &Group{
err = manager.SaveGroup(account.Id, userID, &Group{
ID: "group_2",
Name: "group_name_2",
Peers: []string{},
@@ -121,7 +121,7 @@ func TestDefaultAccountManager_CreateSetupKey(t *testing.T) {
for _, tCase := range []testCase{testCase1, testCase2} {
t.Run(tCase.name, func(t *testing.T) {
key, err := manager.CreateSetupKey(account.Id, tCase.expectedKeyName, SetupKeyReusable, expiresIn,
tCase.expectedGroups, SetupKeyUnlimitedUsage)
tCase.expectedGroups, SetupKeyUnlimitedUsage, userID)
if tCase.expectedFailure {
if err == nil {