(t *testing.T)
| 1238 | } |
| 1239 | |
| 1240 | func TestInstallCRDs_CheckNilErrors(t *testing.T) { |
| 1241 | tests := []struct { |
| 1242 | name string |
| 1243 | input []chart.CRD |
| 1244 | }{ |
| 1245 | { |
| 1246 | name: "only one crd with file nil", |
| 1247 | input: []chart.CRD{ |
| 1248 | {Name: "one", File: nil}, |
| 1249 | }, |
| 1250 | }, |
| 1251 | { |
| 1252 | name: "only one crd with its file data nil", |
| 1253 | input: []chart.CRD{ |
| 1254 | {Name: "one", File: &common.File{Name: "crds/foo.yaml", Data: nil}}, |
| 1255 | }, |
| 1256 | }, |
| 1257 | { |
| 1258 | name: "at least a crd with its file data nil", |
| 1259 | input: []chart.CRD{ |
| 1260 | {Name: "one", File: &common.File{Name: "crds/foo.yaml", Data: []byte("data")}}, |
| 1261 | {Name: "two", File: &common.File{Name: "crds/foo2.yaml", Data: nil}}, |
| 1262 | {Name: "three", File: &common.File{Name: "crds/foo3.yaml", Data: []byte("data")}}, |
| 1263 | }, |
| 1264 | }, |
| 1265 | } |
| 1266 | |
| 1267 | for _, tt := range tests { |
| 1268 | t.Run(tt.name, func(t *testing.T) { |
| 1269 | instAction := installAction(t) |
| 1270 | |
| 1271 | err := instAction.installCRDs(tt.input) |
| 1272 | if err == nil { |
| 1273 | t.Error("got nil expected err") |
| 1274 | } |
| 1275 | }) |
| 1276 | } |
| 1277 | } |
| 1278 | |
| 1279 | func TestInstallRelease_WaitOptionsPassedDownstream(t *testing.T) { |
| 1280 | is := assert.New(t) |
nothing calls this directly
no test coverage detected
searching dependent graphs…