(t *testing.T)
| 1172 | } |
| 1173 | |
| 1174 | func TestInstallCRDs_KubeClient_BuildError(t *testing.T) { |
| 1175 | config := actionConfigFixture(t) |
| 1176 | failingKubeClient := kubefake.FailingKubeClient{PrintingKubeClient: kubefake.PrintingKubeClient{Out: io.Discard}, DummyResources: nil} |
| 1177 | failingKubeClient.BuildError = errors.New("build error") |
| 1178 | config.KubeClient = &failingKubeClient |
| 1179 | instAction := NewInstall(config) |
| 1180 | |
| 1181 | mockFile := common.File{ |
| 1182 | Name: "crds/foo.yaml", |
| 1183 | Data: []byte("hello"), |
| 1184 | } |
| 1185 | mockChart := buildChart(withFile(mockFile)) |
| 1186 | crdsToInstall := mockChart.CRDObjects() |
| 1187 | |
| 1188 | require.Error(t, instAction.installCRDs(crdsToInstall), "failed to install CRD") |
| 1189 | } |
| 1190 | |
| 1191 | func TestInstallCRDs_KubeClient_CreateError(t *testing.T) { |
| 1192 | config := actionConfigFixture(t) |
nothing calls this directly
no test coverage detected
searching dependent graphs…