MCPcopy Create free account
hub / github.com/buildkite/agent-stack-k8s / StartController

Method StartController

internal/integration/testcase_test.go:206–228  ·  view source on GitHub ↗
(ctx context.Context, cfg config.Config, customTags ...string)

Source from the content-addressed store, hash-verified

204}
205
206func (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
230func (t testcase) TriggerBuild(ctx context.Context, pipelineGraphQLID string) api.Build {
231 t.Helper()

Calls 3

QueueNameMethod · 0.95
RunFunction · 0.92
EnsureCleanupFunction · 0.85

Tested by

no test coverage detected