--- Multi-doc format tests for generic (v1.12+) ---
(t *testing.T)
| 501 | // --- Multi-doc format tests for generic (v1.12+) --- |
| 502 | |
| 503 | func TestMultiDocGeneric_ControlPlane(t *testing.T) { |
| 504 | output := renderChartTemplateWithLookup(t, "../../charts/generic", "templates/controlplane.yaml", simpleNicLookup(), "v1.12") |
| 505 | |
| 506 | // Multi-doc: machine section still present but WITHOUT legacy network fields |
| 507 | assertContains(t, output, "machine:") |
| 508 | assertContains(t, output, "type: controlplane") |
| 509 | assertContains(t, output, "kubelet:") |
| 510 | assertContains(t, output, "install:") |
| 511 | |
| 512 | // Multi-doc: deprecated machine.network fields REMOVED (hostname, nameservers, interfaces) |
| 513 | assertNotContains(t, output, " interfaces:") |
| 514 | |
| 515 | // Multi-doc: cluster section still present |
| 516 | assertContains(t, output, "cluster:") |
| 517 | assertContains(t, output, "clusterName: \"generic\"") |
| 518 | assertContains(t, output, "controlPlane:") |
| 519 | assertContains(t, output, "endpoint:") |
| 520 | |
| 521 | // Multi-doc: new document types present |
| 522 | assertContains(t, output, "---") |
| 523 | assertContains(t, output, "kind: HostnameConfig") |
| 524 | assertContains(t, output, "kind: ResolverConfig") |
| 525 | assertContains(t, output, "kind: LinkConfig") |
| 526 | |
| 527 | // Generic does NOT have registries |
| 528 | assertNotContains(t, output, "kind: RegistryMirrorConfig") |
| 529 | } |
| 530 | |
| 531 | func TestMultiDocGeneric_Worker(t *testing.T) { |
| 532 | output := renderChartTemplateWithLookup(t, "../../charts/generic", "templates/worker.yaml", simpleNicLookup(), "v1.12") |
nothing calls this directly
no test coverage detected