MCPcopy
hub / github.com/helm/helm / TestInstallCRDs_WaiterError

Function TestInstallCRDs_WaiterError

pkg/action/install_test.go:1208–1224  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1206}
1207
1208func TestInstallCRDs_WaiterError(t *testing.T) {
1209 config := actionConfigFixture(t)
1210 failingKubeClient := kubefake.FailingKubeClient{PrintingKubeClient: kubefake.PrintingKubeClient{Out: io.Discard}, DummyResources: nil}
1211 failingKubeClient.WaitError = errors.New("wait error")
1212 failingKubeClient.BuildDummy = true
1213 config.KubeClient = &failingKubeClient
1214 instAction := NewInstall(config)
1215
1216 mockFile := common.File{
1217 Name: "crds/foo.yaml",
1218 Data: []byte("hello"),
1219 }
1220 mockChart := buildChart(withFile(mockFile))
1221 crdsToInstall := mockChart.CRDObjects()
1222
1223 require.Error(t, instAction.installCRDs(crdsToInstall), "wait error")
1224}
1225
1226func TestCheckDependencies(t *testing.T) {
1227 dependency := chart.Dependency{Name: "hello"}

Callers

nothing calls this directly

Calls 7

installCRDsMethod · 0.95
actionConfigFixtureFunction · 0.85
NewInstallFunction · 0.85
buildChartFunction · 0.85
withFileFunction · 0.85
CRDObjectsMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…