(t *testing.T)
| 1133 | } |
| 1134 | |
| 1135 | func TestMultiDocGeneric_BondTopology(t *testing.T) { |
| 1136 | origLookup := helmEngine.LookupFunc |
| 1137 | t.Cleanup(func() { helmEngine.LookupFunc = origLookup }) |
| 1138 | helmEngine.LookupFunc = bondTopologyLookup() |
| 1139 | |
| 1140 | chrt, err := loader.LoadDir("../../charts/generic") |
| 1141 | if err != nil { |
| 1142 | t.Fatal(err) |
| 1143 | } |
| 1144 | |
| 1145 | values := make(map[string]any) |
| 1146 | maps.Copy(values, chrt.Values) |
| 1147 | values["endpoint"] = testEndpoint |
| 1148 | |
| 1149 | eng := helmEngine.Engine{} |
| 1150 | out, err := eng.Render(chrt, chartutil.Values{ |
| 1151 | "Values": values, |
| 1152 | "TalosVersion": "v1.12", |
| 1153 | }) |
| 1154 | if err != nil { |
| 1155 | t.Fatal(err) |
| 1156 | } |
| 1157 | |
| 1158 | result := out["generic/templates/controlplane.yaml"] |
| 1159 | assertContains(t, result, "kind: BondConfig") |
| 1160 | assertContains(t, result, "name: bond0") |
| 1161 | assertContains(t, result, "bondMode: 802.3ad") |
| 1162 | assertContains(t, result, "- eth0") |
| 1163 | assertContains(t, result, "- eth1") |
| 1164 | assertNotContains(t, result, "kind: LinkConfig") |
| 1165 | assertNotContains(t, result, "kind: VLANConfig") |
| 1166 | } |
| 1167 | |
| 1168 | func TestMultiDocGeneric_VlanOnBondTopology(t *testing.T) { |
| 1169 | origLookup := helmEngine.LookupFunc |
nothing calls this directly
no test coverage detected