mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
ci: enable gocognit (#9359)
And, bring the server under 300: * Removed the undocumented "disable" STUN address in favor of the --disable-direct flag.
This commit is contained in:
@@ -1496,31 +1496,6 @@ func TestServer(t *testing.T) {
|
||||
w.RequireSuccess()
|
||||
})
|
||||
})
|
||||
t.Run("DisableDERP", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
// Make sure that $CODER_DERP_SERVER_STUN_ADDRESSES can be set to
|
||||
// disable STUN.
|
||||
|
||||
inv, cfg := clitest.New(t,
|
||||
"server",
|
||||
"--in-memory",
|
||||
"--http-address", ":0",
|
||||
"--access-url", "https://example.com",
|
||||
)
|
||||
inv.Environ.Set("CODER_DERP_SERVER_STUN_ADDRESSES", "disable")
|
||||
ptytest.New(t).Attach(inv)
|
||||
clitest.Start(t, inv)
|
||||
gotURL := waitAccessURL(t, cfg)
|
||||
client := codersdk.New(gotURL)
|
||||
|
||||
ctx := testutil.Context(t, testutil.WaitMedium)
|
||||
_ = coderdtest.CreateFirstUser(t, client)
|
||||
gotConfig, err := client.DeploymentConfig(ctx)
|
||||
require.NoError(t, err)
|
||||
|
||||
require.Len(t, gotConfig.Values.DERP.Server.STUNAddresses, 0)
|
||||
})
|
||||
}
|
||||
|
||||
func TestServer_Production(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user