TestMultiDocLayer2VIPLinkOnVLANDefaultGateway pins that the discovery-derived Layer2VIPConfig.link points at the VLAN sub-interface when the VLAN is the link carrying the default route. The single-link renderer set $vipLinkName = $defaultLinkName on the VLAN branch; the rewrite preserves that semant
(t *testing.T)
| 2082 | // existing test pinned the VLAN-default-gateway case with floatingIP |
| 2083 | // set. |
| 2084 | func TestMultiDocLayer2VIPLinkOnVLANDefaultGateway(t *testing.T) { |
| 2085 | output := renderCozystackWith(t, multiNicWithVLANLookup(), map[string]any{ |
| 2086 | "floatingIP": "192.168.100.10", |
| 2087 | }) |
| 2088 | |
| 2089 | if !strings.Contains(output, "kind: Layer2VIPConfig") { |
| 2090 | t.Errorf("expected Layer2VIPConfig in the rendered output:\n%s", output) |
| 2091 | } |
| 2092 | if !strings.Contains(output, "link: eth0.4000") { |
| 2093 | t.Errorf("expected Layer2VIPConfig.link: eth0.4000 (the VLAN sub-interface carrying the default route), got:\n%s", output) |
| 2094 | } |
| 2095 | } |
| 2096 | |
| 2097 | // TestMultiDocBondConfigOmitsMissingBondMasterFields pins the |
| 2098 | // gracefully-degrading BondConfig render: when discovery returns a |
nothing calls this directly
no test coverage detected