| 36 | } |
| 37 | |
| 38 | func checkRenderedUnstructured(objs []*unstructured.Unstructured, t *templateData) { |
| 39 | for idx, obj := range objs { |
| 40 | Expect(obj.GetKind()).To(Equal(fmt.Sprint("TestObj", idx+1))) |
| 41 | Expect(obj.Object["metadata"].(map[string]interface{})["name"].(string)).To(Equal(t.Foo)) |
| 42 | Expect(obj.Object["spec"].(map[string]interface{})["attribute"].(string)).To(Equal(t.Bar)) |
| 43 | Expect(obj.Object["spec"].(map[string]interface{})["anotherAttribute"].(string)).To(Equal(t.Baz)) |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | func getFilesFromDir(dirPath string) []string { |
| 48 | files, err := utils.GetFilesWithSuffix(dirPath, "json", "yaml", "yml") |