(t *testing.T)
| 219 | } |
| 220 | |
| 221 | func TestRenderWithDNS(t *testing.T) { |
| 222 | c := &chart.Chart{ |
| 223 | Metadata: &chart.Metadata{ |
| 224 | Name: "moby", |
| 225 | Version: "1.2.3", |
| 226 | }, |
| 227 | Templates: []*common.File{ |
| 228 | {Name: "templates/test1", ModTime: time.Now(), Data: []byte("{{getHostByName \"helm.sh\"}}")}, |
| 229 | }, |
| 230 | Values: map[string]any{}, |
| 231 | } |
| 232 | |
| 233 | vals := map[string]any{ |
| 234 | "Values": map[string]any{}, |
| 235 | } |
| 236 | |
| 237 | v, err := util.CoalesceValues(c, vals) |
| 238 | if err != nil { |
| 239 | t.Fatalf("Failed to coalesce values: %s", err) |
| 240 | } |
| 241 | |
| 242 | var e Engine |
| 243 | e.EnableDNS = true |
| 244 | out, err := e.Render(c, v) |
| 245 | if err != nil { |
| 246 | t.Errorf("Failed to render templates: %s", err) |
| 247 | } |
| 248 | |
| 249 | for _, val := range c.Templates { |
| 250 | fp := path.Join("moby", val.Name) |
| 251 | if out[fp] == "" { |
| 252 | t.Errorf("Expected IP address, got %q", out[fp]) |
| 253 | } |
| 254 | } |
| 255 | } |
| 256 | |
| 257 | type kindProps struct { |
| 258 | shouldErr error |
nothing calls this directly
no test coverage detected
searching dependent graphs…