Skip to content

chore: make default workspace proxy editable #7903

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 13 commits into from
Jun 8, 2023
Prev Previous commit
Next Next commit
Fix data race'
  • Loading branch information
Emyrk committed Jun 7, 2023
commit bf0e1ced478ca0f7da69c2d6b3021d4d3bf8f733
9 changes: 6 additions & 3 deletions enterprise/coderd/workspaceproxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,10 @@ func TestIssueSignedAppToken(t *testing.T) {
})
require.NoError(t, err)

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

t.Run("BadAppRequest", func(t *testing.T) {
t.Parallel()
proxyClient := wsproxysdk.New(client.URL)
proxyClient.SetSessionToken(proxyRes.ProxyToken)

ctx := testutil.Context(t, testutil.WaitLong)
_, err = proxyClient.IssueSignedAppToken(ctx, workspaceapps.IssueTokenRequest{
Expand All @@ -410,6 +409,8 @@ func TestIssueSignedAppToken(t *testing.T) {
}
t.Run("OK", func(t *testing.T) {
t.Parallel()
proxyClient := wsproxysdk.New(client.URL)
proxyClient.SetSessionToken(proxyRes.ProxyToken)

ctx := testutil.Context(t, testutil.WaitLong)
_, err = proxyClient.IssueSignedAppToken(ctx, goodRequest)
Expand All @@ -418,6 +419,8 @@ func TestIssueSignedAppToken(t *testing.T) {

t.Run("OKHTML", func(t *testing.T) {
t.Parallel()
proxyClient := wsproxysdk.New(client.URL)
proxyClient.SetSessionToken(proxyRes.ProxyToken)

rw := httptest.NewRecorder()
ctx := testutil.Context(t, testutil.WaitLong)
Expand Down