(t *testing.T)
| 1133 | } |
| 1134 | |
| 1135 | func TestInstallCRDs(t *testing.T) { |
| 1136 | config := actionConfigFixtureWithDummyResources(t, createDummyCRDList(false)) |
| 1137 | instAction := NewInstall(config) |
| 1138 | |
| 1139 | mockFile := common.File{ |
| 1140 | Name: "crds/foo.yaml", |
| 1141 | Data: []byte("hello"), |
| 1142 | } |
| 1143 | mockChart := buildChart(withFile(mockFile)) |
| 1144 | crdsToInstall := mockChart.CRDObjects() |
| 1145 | |
| 1146 | assert.Len(t, crdsToInstall, 1) |
| 1147 | assert.Equal(t, crdsToInstall[0].File.Data, mockFile.Data) |
| 1148 | require.NoError(t, instAction.installCRDs(crdsToInstall)) |
| 1149 | } |
| 1150 | |
| 1151 | func TestInstallCRDs_AlreadyExist(t *testing.T) { |
| 1152 | dummyResources := createDummyCRDList(false) |
nothing calls this directly
no test coverage detected
searching dependent graphs…