MCPcopy
hub / github.com/helm/helm / TestInstallCRDs_KubeClient_CreateError

Function TestInstallCRDs_KubeClient_CreateError

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

Source from the content-addressed store, hash-verified

1189}
1190
1191func TestInstallCRDs_KubeClient_CreateError(t *testing.T) {
1192 config := actionConfigFixture(t)
1193 failingKubeClient := kubefake.FailingKubeClient{PrintingKubeClient: kubefake.PrintingKubeClient{Out: io.Discard}, DummyResources: nil}
1194 failingKubeClient.CreateError = errors.New("create error")
1195 config.KubeClient = &failingKubeClient
1196 instAction := NewInstall(config)
1197
1198 mockFile := common.File{
1199 Name: "crds/foo.yaml",
1200 Data: []byte("hello"),
1201 }
1202 mockChart := buildChart(withFile(mockFile))
1203 crdsToInstall := mockChart.CRDObjects()
1204
1205 require.Error(t, instAction.installCRDs(crdsToInstall), "failed to install CRD")
1206}
1207
1208func TestInstallCRDs_WaiterError(t *testing.T) {
1209 config := actionConfigFixture(t)

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…