Skip to content

fix: allow ports in wildcard url configuration #11657

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
fixup tests
  • Loading branch information
Emyrk committed Jan 17, 2024
commit c87f7a4e776aaef2693f344283edd8071140a78a
3 changes: 2 additions & 1 deletion coderd/workspaceproxies_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package coderd_test

import (
"fmt"
"testing"

"github.com/google/uuid"
Expand Down Expand Up @@ -44,7 +45,7 @@ func TestRegions(t *testing.T) {
require.NotEmpty(t, regions[0].IconURL)
require.True(t, regions[0].Healthy)
require.Equal(t, client.URL.String(), regions[0].PathAppURL)
require.Equal(t, appHostname, regions[0].WildcardHostname)
require.Equal(t, fmt.Sprintf("%s:%s", appHostname, client.URL.Port()), regions[0].WildcardHostname)

// Ensure the primary region ID is constant.
regions2, err := client.Regions(ctx)
Expand Down
4 changes: 2 additions & 2 deletions enterprise/coderd/workspaceproxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func TestRegions(t *testing.T) {
require.NotEmpty(t, regions[0].IconURL)
require.True(t, regions[0].Healthy)
require.Equal(t, client.URL.String(), regions[0].PathAppURL)
require.Equal(t, appHostname, regions[0].WildcardHostname)
require.Equal(t, fmt.Sprintf("%s:%s", appHostname, client.URL.Port()), regions[0].WildcardHostname)

// Ensure the primary region ID is constant.
regions2, err := client.Regions(ctx)
Expand Down Expand Up @@ -149,7 +149,7 @@ func TestRegions(t *testing.T) {
require.NotEmpty(t, regions[0].IconURL)
require.True(t, regions[0].Healthy)
require.Equal(t, client.URL.String(), regions[0].PathAppURL)
require.Equal(t, appHostname, regions[0].WildcardHostname)
require.Equal(t, fmt.Sprintf("%s:%s", appHostname, client.URL.Port()), regions[0].WildcardHostname)

// Ensure non-zero fields of the default proxy
require.NotZero(t, primary.Name)
Expand Down