@@ -37,8 +37,10 @@ import (
37
37
"golang.org/x/xerrors"
38
38
"google.golang.org/api/idtoken"
39
39
"google.golang.org/api/option"
40
+ "tailscale.com/derp"
40
41
"tailscale.com/net/stun/stuntest"
41
42
"tailscale.com/tailcfg"
43
+ "tailscale.com/types/key"
42
44
"tailscale.com/types/nettype"
43
45
44
46
"cdr.dev/slog"
@@ -59,6 +61,7 @@ import (
59
61
"github.com/coder/coder/provisionerd"
60
62
"github.com/coder/coder/provisionersdk"
61
63
"github.com/coder/coder/provisionersdk/proto"
64
+ "github.com/coder/coder/tailnet"
62
65
"github.com/coder/coder/testutil"
63
66
)
64
67
@@ -184,6 +187,9 @@ func NewOptions(t *testing.T, options *Options) (*httptest.Server, context.Cance
184
187
stunAddr , stunCleanup := stuntest .ServeWithPacketListener (t , nettype.Std {})
185
188
t .Cleanup (stunCleanup )
186
189
190
+ derpServer := derp .NewServer (key .NewNode (), tailnet .Logger (slogtest .Make (t , nil ).Named ("derp" )))
191
+ derpServer .SetMeshKey ("test-key" )
192
+
187
193
// match default with cli default
188
194
if options .SSHKeygenAlgorithm == "" {
189
195
options .SSHKeygenAlgorithm = gitsshkey .AlgorithmEd25519
@@ -208,6 +214,7 @@ func NewOptions(t *testing.T, options *Options) (*httptest.Server, context.Cance
208
214
OIDCConfig : options .OIDCConfig ,
209
215
GoogleTokenValidator : options .GoogleTokenValidator ,
210
216
SSHKeygenAlgorithm : options .SSHKeygenAlgorithm ,
217
+ DERPServer : derpServer ,
211
218
APIRateLimit : options .APIRateLimit ,
212
219
Authorizer : options .Authorizer ,
213
220
Telemetry : telemetry .NewNoop (),
0 commit comments