newSizingTestCP builds a ControlPlane whose K8s config enables client worker sizing with a prod-shaped clamp policy and explicit defaults.
()
| 13 | // newSizingTestCP builds a ControlPlane whose K8s config enables client worker |
| 14 | // sizing with a prod-shaped clamp policy and explicit defaults. |
| 15 | func 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 | |
| 28 | func TestResolveWorkerProfileSizing(t *testing.T) { |
| 29 | cp := newSizingTestCP() |
no outgoing calls
no test coverage detected