(t *testing.T)
| 24 | ) |
| 25 | |
| 26 | func Test_Runner(t *testing.T) { |
| 27 | t.Parallel() |
| 28 | if testutil.RaceEnabled() { |
| 29 | t.Skip("Race detector enabled, skipping time-sensitive test.") |
| 30 | } |
| 31 | |
| 32 | t.Run("OK", func(t *testing.T) { |
| 33 | t.Parallel() |
| 34 | |
| 35 | ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong) |
| 36 | defer cancel() |
| 37 | |
| 38 | client := coderdtest.New(t, &coderdtest.Options{ |
| 39 | IncludeProvisionerDaemon: true, |
| 40 | }) |
| 41 | user := coderdtest.CreateFirstUser(t, client) |
| 42 | |
| 43 | authToken1 := uuid.NewString() |
| 44 | authToken2 := uuid.NewString() |
| 45 | authToken3 := uuid.NewString() |
| 46 | version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, &echo.Responses{ |
| 47 | Parse: echo.ParseComplete, |
| 48 | ProvisionPlan: echo.PlanComplete, |
| 49 | ProvisionApply: []*proto.Response{ |
| 50 | { |
| 51 | Type: &proto.Response_Log{ |
| 52 | Log: &proto.Log{ |
| 53 | Level: proto.LogLevel_INFO, |
| 54 | Output: "hello from logs", |
| 55 | }, |
| 56 | }, |
| 57 | }, |
| 58 | { |
| 59 | Type: &proto.Response_Apply{ |
| 60 | Apply: &proto.ApplyComplete{}, |
| 61 | }, |
| 62 | }, |
| 63 | }, |
| 64 | ProvisionGraph: []*proto.Response{ |
| 65 | { |
| 66 | Type: &proto.Response_Graph{ |
| 67 | Graph: &proto.GraphComplete{ |
| 68 | Resources: []*proto.Resource{ |
| 69 | { |
| 70 | Name: "example1", |
| 71 | Type: "aws_instance", |
| 72 | Agents: []*proto.Agent{ |
| 73 | { |
| 74 | Id: uuid.NewString(), |
| 75 | Name: "agent1", |
| 76 | Auth: &proto.Agent_Token{ |
| 77 | Token: authToken1, |
| 78 | }, |
| 79 | Apps: []*proto.App{}, |
| 80 | }, |
| 81 | { |
| 82 | Id: uuid.NewString(), |
| 83 | Name: "agent2", |
nothing calls this directly
no test coverage detected