SetupConfig applies the URL and SessionToken of the client to the config.
(t *testing.T, client *codersdk.Client, root config.Root)
| 109 | |
| 110 | // SetupConfig applies the URL and SessionToken of the client to the config. |
| 111 | func 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. |