(ctx context.Context, cfg config.Config, customTags ...string)
| 204 | } |
| 205 | |
| 206 | func (t testcase) StartController(ctx context.Context, cfg config.Config, customTags ...string) { |
| 207 | t.Helper() |
| 208 | |
| 209 | runCtx, cancel := context.WithCancel(ctx) |
| 210 | EnsureCleanup(t.T, cancel) |
| 211 | |
| 212 | if len(customTags) > 0 { |
| 213 | cfg.Tags = customTags |
| 214 | } else { |
| 215 | cfg.Tags = []string{fmt.Sprintf("queue=%s", t.QueueName())} |
| 216 | } |
| 217 | cfg.Debug = true |
| 218 | // During, we often have many test controller running in the same namespaces |
| 219 | // Setting a static identifer here so their informer aren't steping on each other. |
| 220 | cfg.ID = uuid.New().String() |
| 221 | |
| 222 | // Since we run multiple test controllers in parallel, allowing these would cause port conflict. |
| 223 | // We use the profiler nor prometheus metrics for integration test anyway. |
| 224 | cfg.PrometheusPort = 0 |
| 225 | cfg.ProfilerAddress = "" |
| 226 | |
| 227 | go controller.Run(runCtx, t.Logger, t.Kubernetes, &cfg) |
| 228 | } |
| 229 | |
| 230 | func (t testcase) TriggerBuild(ctx context.Context, pipelineGraphQLID string) api.Build { |
| 231 | t.Helper() |
no test coverage detected