Adding DNS settings for accounts (#655)

Allow users to set groups in which the DNS management is disabled

Added API, activity store, and network map sync test
This commit is contained in:
Maycon Santos
2023-01-17 17:34:40 +01:00
committed by GitHub
parent 2bc3d88af3
commit 12ae2e93fc
14 changed files with 805 additions and 38 deletions

View File

@ -1128,19 +1128,20 @@ func initTestNSAccount(t *testing.T, am *DefaultAccountManager) (*Account, error
account.NameServerGroups[existingNSGroup.ID] = &existingNSGroup
defaultGroup, err := account.GetGroupAll()
if err != nil {
return nil, err
newGroup1 := &Group{
ID: group1ID,
Name: group1ID,
}
newGroup2 := &Group{
ID: group2ID,
Name: group2ID,
}
newGroup1 := defaultGroup.Copy()
newGroup1.ID = group1ID
newGroup2 := defaultGroup.Copy()
newGroup2.ID = group2ID
account.Groups[newGroup1.ID] = newGroup1
account.Groups[newGroup2.ID] = newGroup2
err = am.Store.SaveAccount(account)
err := am.Store.SaveAccount(account)
if err != nil {
return nil, err
}