(t *testing.T)
| 1189 | } |
| 1190 | |
| 1191 | func 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 | |
| 1208 | func TestInstallCRDs_WaiterError(t *testing.T) { |
| 1209 | config := actionConfigFixture(t) |
nothing calls this directly
no test coverage detected
searching dependent graphs…