MCPcopy Create free account
hub / github.com/cozystack/talm / TestLegacyCozystack_Worker

Function TestLegacyCozystack_Worker

pkg/engine/render_test.go:263–284  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

261}
262
263func TestLegacyCozystack_Worker(t *testing.T) {
264 output := renderChartTemplate(t, "../../charts/cozystack", "templates/worker.yaml")
265
266 // Legacy format: machine section present
267 assertContains(t, output, "machine:")
268 assertContains(t, output, "type: worker")
269 assertContains(t, output, "network:")
270 assertContains(t, output, "hostname:")
271 assertContains(t, output, "interfaces:")
272 assertContains(t, output, "registries:")
273
274 // Legacy format: cluster section present
275 assertContains(t, output, "cluster:")
276
277 // Worker should NOT have controlplane-specific settings
278 assertNotContains(t, output, "allowSchedulingOnControlPlanes:")
279
280 // No v1.12 multi-doc types
281 assertNotContains(t, output, "kind: HostnameConfig")
282 assertNotContains(t, output, "kind: RegistryMirrorConfig")
283 assertNotContains(t, output, "kind: Layer2VIPConfig")
284}
285
286func TestLegacyGeneric_ControlPlane(t *testing.T) {
287 output := renderChartTemplate(t, "../../charts/generic", "templates/controlplane.yaml")

Callers

nothing calls this directly

Calls 3

renderChartTemplateFunction · 0.85
assertContainsFunction · 0.85
assertNotContainsFunction · 0.85

Tested by

no test coverage detected