Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: avoid DNS lookups for DERP in tests#19385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
deansheather merged 1 commit intomainfromdean/flake-wsproxy-derp
Aug 18, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletioncoderd/coderdtest/coderdtest.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -471,7 +471,7 @@ func NewOptions(t testing.TB, options *Options) (func(http.Handler), context.Can

serverURL, err := url.Parse(srv.URL)
require.NoError(t, err)
serverURL.Host = fmt.Sprintf("localhost:%d", tcpAddr.Port)
serverURL.Host = fmt.Sprintf("127.0.0.1:%d", tcpAddr.Port)

derpPort, err := strconv.Atoi(serverURL.Port())
require.NoError(t, err)
Expand Down
2 changes: 1 addition & 1 deletionenterprise/coderd/coderdenttest/coderdenttest.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -105,7 +105,7 @@ func NewWithAPI(t *testing.T, options *Options) (
AuditLogging: options.AuditLogging,
BrowserOnly: options.BrowserOnly,
SCIMAPIKey: options.SCIMAPIKey,
DERPServerRelayAddress:oop.AccessURL.String(),
DERPServerRelayAddress:serverURL.String(),
DERPServerRegionID: oop.BaseDERPMap.RegionIDs()[0],
ReplicaSyncUpdateInterval: options.ReplicaSyncUpdateInterval,
ReplicaErrorGracePeriod: options.ReplicaErrorGracePeriod,
Expand Down
2 changes: 1 addition & 1 deletionenterprise/coderd/coderdenttest/proxytest.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -109,7 +109,7 @@ func NewWorkspaceProxyReplica(t *testing.T, coderdAPI *coderd.API, owner *coders
serverURL, err := url.Parse(srv.URL)
require.NoError(t, err)

serverURL.Host = fmt.Sprintf("localhost:%d", tcpAddr.Port)
serverURL.Host = fmt.Sprintf("127.0.0.1:%d", tcpAddr.Port)

accessURL := options.ProxyURL
if accessURL == nil {
Expand Down
12 changes: 3 additions & 9 deletionsenterprise/wsproxy/wsproxy_test.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -94,14 +94,8 @@ func TestDERPOnly(t *testing.T) {
func TestDERP(t *testing.T) {
t.Parallel()

deploymentValues := coderdtest.DeploymentValues(t)
deploymentValues.Experiments = []string{
"*",
}

client, closer, api, user := coderdenttest.NewWithAPI(t, &coderdenttest.Options{
Options: &coderdtest.Options{
DeploymentValues: deploymentValues,
AppHostname: "*.primary.test.coder.com",
IncludeProvisionerDaemon: true,
RealIPConfig: &httpmw.RealIPConfig{
Expand DownExpand Up@@ -146,7 +140,7 @@ func TestDERP(t *testing.T) {
})
require.NoError(t, err)

// Wait forboth running proxies to become healthy.
// Wait forall three running proxies to become healthy.
require.Eventually(t, func() bool {
err := api.ProxyHealth.ForceUpdate(ctx)
if !assert.NoError(t, err) {
Expand DownExpand Up@@ -207,7 +201,7 @@ resourceLoop:
require.NoError(t, err)

// There should be three DERP regions in the map: the primary, and each
// of the two running proxies. Also the STUN-only regions.
// of the twoDERP-enabledrunning proxies. Also the STUN-only regions.
require.NotNil(t, connInfo.DERPMap)
require.Len(t, connInfo.DERPMap.Regions, 3+len(api.DeploymentValues.DERP.Server.STUNAddresses.Value()))

Expand DownExpand Up@@ -290,7 +284,7 @@ resourceLoop:

t.Run(r.RegionName, func(t *testing.T) {
t.Parallel()
ctx := testutil.Context(t, testutil.WaitShort)
ctx := testutil.Context(t, testutil.WaitLong)

derpMap := &tailcfg.DERPMap{
Regions: map[int]*tailcfg.DERPRegion{
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp