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

Function TestMultiDocGeneric_VIPLinkOverride

pkg/engine/render_test.go:7177–7186  ·  view source on GitHub ↗

TestMultiDocGeneric_VIPLinkOverride mirrors the cozystack VIP-link override test for the generic preset. The two charts share helper shape, so the override must apply symmetrically — without this the generic-preset apply pipeline would still pin the VIP onto the physical NIC discovered at first appl

(t *testing.T)

Source from the content-addressed store, hash-verified

7175// physical NIC discovered at first apply when the operator wanted
7176// the VIP on a not-yet-existing VLAN sub-interface.
7177func TestMultiDocGeneric_VIPLinkOverride(t *testing.T) {
7178 result := renderGenericWith(t, simpleNicLookup(), map[string]any{
7179 "floatingIP": "192.168.201.5",
7180 "vipLink": "eth0.4000",
7181 })
7182
7183 assertContains(t, result, "kind: Layer2VIPConfig")
7184 assertContains(t, result, "link: eth0.4000")
7185 assertNotContains(t, result, "link: eth0\n")
7186}
7187
7188// TestMultiDocCozystack_ShippedDefaultsFailFresh asserts that a fresh
7189// `talm init -p cozystack` user who keeps values.yaml defaults gets a

Callers

nothing calls this directly

Calls 4

renderGenericWithFunction · 0.85
simpleNicLookupFunction · 0.85
assertContainsFunction · 0.85
assertNotContainsFunction · 0.85

Tested by

no test coverage detected