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

Function Test_Runner

scaletest/createworkspaces/run_test.go:31–531  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

29)
30
31func Test_Runner(t *testing.T) {
32 t.Parallel()
33
34 if testutil.RaceEnabled() {
35 t.Skip("Race detector enabled, skipping time-sensitive test.")
36 }
37
38 testParameters := []*proto.RichParameter{
39 {
40 Name: "foo",
41 DefaultValue: "baz",
42 },
43 }
44 testParameterValues := []codersdk.WorkspaceBuildParameter{
45 {
46 Name: "foo",
47 Value: "baz",
48 },
49 }
50
51 t.Run("OK", func(t *testing.T) {
52 t.Parallel()
53
54 client := coderdtest.New(t, &coderdtest.Options{
55 IncludeProvisionerDaemon: true,
56 })
57 user := coderdtest.CreateFirstUser(t, client)
58
59 authToken := uuid.NewString()
60 version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{
61 Parse: echo.ParseComplete,
62 ProvisionGraph: []*proto.Response{
63 {
64 Type: &proto.Response_Graph{
65 Graph: &proto.GraphComplete{
66 Parameters: testParameters,
67 Resources: []*proto.Resource{
68 {
69 Name: "example",
70 Type: "aws_instance",
71 Agents: []*proto.Agent{
72 {
73 Id: uuid.NewString(),
74 Name: "agent",
75 Auth: &proto.Agent_Token{
76 Token: authToken,
77 },
78 Apps: []*proto.App{},
79 },
80 },
81 },
82 },
83 },
84 },
85 },
86 },
87 ProvisionApply: []*proto.Response{
88 {

Callers

nothing calls this directly

Calls 15

RunMethod · 0.95
CleanupMethod · 0.95
RaceEnabledFunction · 0.92
NewFunction · 0.92
CreateFirstUserFunction · 0.92
CreateTemplateVersionFunction · 0.92
CreateTemplateFunction · 0.92
ContextFunction · 0.92
NewRunnerFunction · 0.92
DurationTypeAlias · 0.92
RefFunction · 0.92

Tested by

no test coverage detected