Skip to content

feat: Add VSCODE_PROXY_URI to surface code-server ports #4798

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 7 commits into from
Nov 4, 2022
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
Next Next commit
Check if app host is provided
  • Loading branch information
kylecarbs committed Nov 1, 2022
commit 9ee60d67e86dfa1c75d35e8f39cf758f9c744a16
20 changes: 11 additions & 9 deletions coderd/workspaceapps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,17 @@ func createWorkspaceWithApps(t *testing.T, client *codersdk.Client, orgID uuid.U

agentClient := codersdk.New(client.URL)
agentClient.SessionToken = authToken
metadata, err := agentClient.WorkspaceAgentMetadata(context.Background())
require.NoError(t, err)
require.Equal(t, fmt.Sprintf(
"http://{{port}}--%s--%s--%s%s",
proxyTestAgentName,
workspace.Name,
"testuser",
strings.ReplaceAll(appHost, "*", ""),
), metadata.VSCodePortProxyURI)
if appHost != "" {
metadata, err := agentClient.WorkspaceAgentMetadata(context.Background())
require.NoError(t, err)
require.Equal(t, fmt.Sprintf(
"http://{{port}}--%s--%s--%s%s",
proxyTestAgentName,
workspace.Name,
"testuser",
strings.ReplaceAll(appHost, "*", ""),
), metadata.VSCodePortProxyURI)
}
agentCloser := agent.New(agent.Options{
Client: agentClient,
Logger: slogtest.Make(t, nil).Named("agent"),
Expand Down