mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-24 03:06:38 +00:00
update service user tests
This commit is contained in:
@@ -416,6 +416,14 @@ func TestUser_CreateServiceUser(t *testing.T) {
|
||||
t.Cleanup(cleanup)
|
||||
|
||||
account := newAccountWithId(context.Background(), mockAccountID, mockUserID, "", "", "", false)
|
||||
account.Groups["group1"] = &types.Group{
|
||||
ID: "group1",
|
||||
Name: "group1",
|
||||
}
|
||||
account.Groups["group2"] = &types.Group{
|
||||
ID: "group2",
|
||||
Name: "group2",
|
||||
}
|
||||
|
||||
err = store.SaveAccount(context.Background(), account)
|
||||
if err != nil {
|
||||
@@ -463,6 +471,14 @@ func TestUser_CreateUser_ServiceUser(t *testing.T) {
|
||||
t.Cleanup(cleanup)
|
||||
|
||||
account := newAccountWithId(context.Background(), mockAccountID, mockUserID, "", "", "", false)
|
||||
account.Groups["group1"] = &types.Group{
|
||||
ID: "group1",
|
||||
Name: "group1",
|
||||
}
|
||||
account.Groups["group2"] = &types.Group{
|
||||
ID: "group2",
|
||||
Name: "group2",
|
||||
}
|
||||
|
||||
err = store.SaveAccount(context.Background(), account)
|
||||
if err != nil {
|
||||
@@ -542,6 +558,14 @@ func TestUser_InviteNewUser(t *testing.T) {
|
||||
t.Cleanup(cleanup)
|
||||
|
||||
account := newAccountWithId(context.Background(), mockAccountID, mockUserID, "", "", "", false)
|
||||
account.Groups["group1"] = &types.Group{
|
||||
ID: "group1",
|
||||
Name: "group1",
|
||||
}
|
||||
account.Groups["group2"] = &types.Group{
|
||||
ID: "group2",
|
||||
Name: "group2",
|
||||
}
|
||||
|
||||
err = store.SaveAccount(context.Background(), account)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user