Merge branch 'main' into feature/port-forwarding

This commit is contained in:
Viktor Liu
2025-02-20 11:31:04 +01:00
191 changed files with 10566 additions and 3093 deletions

View File

@@ -380,12 +380,12 @@ func TestCreateNameServerGroup(t *testing.T) {
t.Run(testCase.name, func(t *testing.T) {
am, err := createNSManager(t)
if err != nil {
t.Error("failed to create account manager")
t.Fatalf("failed to create account manager: %s", err)
}
account, err := initTestNSAccount(t, am)
if err != nil {
t.Error("failed to init testing account")
t.Fatalf("failed to init testing account: %s", err)
}
outNSGroup, err := am.CreateNameServerGroup(
@@ -608,12 +608,12 @@ func TestSaveNameServerGroup(t *testing.T) {
t.Run(testCase.name, func(t *testing.T) {
am, err := createNSManager(t)
if err != nil {
t.Error("failed to create account manager")
t.Fatalf("failed to create account manager: %s", err)
}
account, err := initTestNSAccount(t, am)
if err != nil {
t.Error("failed to init testing account")
t.Fatalf("failed to init testing account: %s", err)
}
account.NameServerGroups[testCase.existingNSGroup.ID] = testCase.existingNSGroup
@@ -707,7 +707,7 @@ func TestDeleteNameServerGroup(t *testing.T) {
account, err := initTestNSAccount(t, am)
if err != nil {
t.Error("failed to init testing account")
t.Fatalf("failed to init testing account: %s", err)
}
account.NameServerGroups[testingNSGroup.ID] = testingNSGroup
@@ -742,7 +742,7 @@ func TestGetNameServerGroup(t *testing.T) {
account, err := initTestNSAccount(t, am)
if err != nil {
t.Error("failed to init testing account")
t.Fatalf("failed to init testing account: %s", err)
}
foundGroup, err := am.GetNameServerGroup(context.Background(), account.Id, testUserID, existingNSGroupID)
@@ -762,6 +762,7 @@ func TestGetNameServerGroup(t *testing.T) {
func createNSManager(t *testing.T) (*DefaultAccountManager, error) {
t.Helper()
store, err := createNSStore(t)
if err != nil {
return nil, err