MCPcopy Create free account
hub / github.com/PostHog/duckgres / newSizingTestCP

Function newSizingTestCP

controlplane/worker_profile_test.go:15–26  ·  view source on GitHub ↗

newSizingTestCP builds a ControlPlane whose K8s config enables client worker sizing with a prod-shaped clamp policy and explicit defaults.

()

Source from the content-addressed store, hash-verified

13// newSizingTestCP builds a ControlPlane whose K8s config enables client worker
14// sizing with a prod-shaped clamp policy and explicit defaults.
15func newSizingTestCP() *ControlPlane {
16 return &ControlPlane{cfg: ControlPlaneConfig{K8s: K8sConfig{
17 AllowClientWorkerProfile: true,
18 WorkerCPURequest: "8",
19 WorkerMemoryRequest: "16Gi",
20 WorkerProfileMinCPU: "1",
21 WorkerProfileMaxCPU: "16",
22 WorkerProfileMinMemory: "4Gi",
23 WorkerProfileMaxMemory: "64Gi",
24 WorkerMaxTTL: time.Hour,
25 }}}
26}
27
28func TestResolveWorkerProfileSizing(t *testing.T) {
29 cp := newSizingTestCP()

Calls

no outgoing calls

Tested by

no test coverage detected