feat: add single tailnet support to moons (#8587)

This commit is contained in:
Colin Adler
2023-07-19 11:11:11 -05:00
committed by GitHub
parent cc8d0af027
commit 517fb19474
36 changed files with 1195 additions and 80 deletions
+1 -4
View File
@@ -8,7 +8,6 @@ import (
"net/http/httptest"
"net/netip"
"net/url"
"sync/atomic"
"testing"
"github.com/google/uuid"
@@ -133,9 +132,7 @@ func setupAgent(t *testing.T, agentAddresses []netip.Prefix) (uuid.UUID, agent.A
DERPMap: derpMap,
}
var coordPtr atomic.Pointer[tailnet.Coordinator]
coord := tailnet.NewCoordinator(logger)
coordPtr.Store(&coord)
t.Cleanup(func() {
_ = coord.Close()
})
@@ -194,7 +191,7 @@ func setupAgent(t *testing.T, agentAddresses []netip.Prefix) (uuid.UUID, agent.A
logger,
derpServer,
manifest.DERPMap,
&coordPtr,
func(context.Context) (tailnet.MultiAgentConn, error) { return coord.ServeMultiAgent(uuid.New()), nil },
cache,
)
require.NoError(t, err)