Skip to content

chore: relax wsproxy version checking #9796

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 4 commits into from
Sep 27, 2023
Merged
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
Test makes no sense, test runs do not check the version
  • Loading branch information
Emyrk committed Sep 27, 2023
commit ebe0593e58ff84667d71be9996df022240d7010b
31 changes: 0 additions & 31 deletions enterprise/coderd/workspaceproxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,37 +409,6 @@ func TestProxyRegisterDeregister(t *testing.T) {
require.Error(t, err)
})

t.Run("BlockMismatchingVersion", func(t *testing.T) {
t.Parallel()

client, _ := setup(t)

ctx := testutil.Context(t, testutil.WaitLong)
createRes, err := client.CreateWorkspaceProxy(ctx, codersdk.CreateWorkspaceProxyRequest{
Name: "hi",
})
require.NoError(t, err)

proxyClient := wsproxysdk.New(client.URL)
proxyClient.SetSessionToken(createRes.ProxyToken)

_, err = proxyClient.RegisterWorkspaceProxy(ctx, wsproxysdk.RegisterWorkspaceProxyRequest{
AccessURL: "https://proxy.coder.test",
WildcardHostname: "*.proxy.coder.test",
DerpEnabled: true,
ReplicaID: uuid.New(),
ReplicaHostname: "mars",
ReplicaError: "",
ReplicaRelayAddress: "http://127.0.0.1:8080",
Version: "v0.0.0",
})
require.Error(t, err)
var sdkErr *codersdk.Error
require.ErrorAs(t, err, &sdkErr)
require.Equal(t, http.StatusBadRequest, sdkErr.StatusCode())
require.Contains(t, sdkErr.Response.Message, "Version mismatch")
})

t.Run("ReregisterUpdateReplica", func(t *testing.T) {
t.Parallel()

Expand Down