(t *testing.T)
| 29 | ) |
| 30 | |
| 31 | func 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 | { |
nothing calls this directly
no test coverage detected