MCPcopy Index your code
hub / github.com/coder/coder / SetupConfig

Function SetupConfig

cli/clitest/clitest.go:111–116  ·  view source on GitHub ↗

SetupConfig applies the URL and SessionToken of the client to the config.

(t *testing.T, client *codersdk.Client, root config.Root)

Source from the content-addressed store, hash-verified

109
110// SetupConfig applies the URL and SessionToken of the client to the config.
111func SetupConfig(t *testing.T, client *codersdk.Client, root config.Root) {
112 err := root.Session().Write(client.SessionToken())
113 require.NoError(t, err)
114 err = root.URL().Write(client.URL.String())
115 require.NoError(t, err)
116}
117
118// CreateTemplateVersionSource writes the echo provisioner responses into a
119// new temporary testing directory.

Callers 15

TestCliTemplateCreateFunction · 0.92
TestUserDeleteFunction · 0.92
TestTemplateDeleteFunction · 0.92
TestExpTaskListFunction · 0.92
TestTemplatePull_StdoutFunction · 0.92
TestTemplatePull_ToDirFunction · 0.92
TestWorkspaceAgentFunction · 0.92

Calls 5

WriteMethod · 0.65
SessionMethod · 0.65
SessionTokenMethod · 0.45
URLMethod · 0.45
StringMethod · 0.45

Tested by 15

TestCliTemplateCreateFunction · 0.74
TestUserDeleteFunction · 0.74
TestTemplateDeleteFunction · 0.74
TestExpTaskListFunction · 0.74
TestTemplatePull_StdoutFunction · 0.74
TestTemplatePull_ToDirFunction · 0.74
TestWorkspaceAgentFunction · 0.74