(t *testing.T)
| 565 | } |
| 566 | |
| 567 | func TestAllTemplates(t *testing.T) { |
| 568 | modTime := time.Now() |
| 569 | ch1 := &chart.Chart{ |
| 570 | Metadata: &chart.Metadata{Name: "ch1"}, |
| 571 | Templates: []*common.File{ |
| 572 | {Name: "templates/foo", ModTime: modTime, Data: []byte("foo")}, |
| 573 | {Name: "templates/bar", ModTime: modTime, Data: []byte("bar")}, |
| 574 | }, |
| 575 | } |
| 576 | dep1 := &chart.Chart{ |
| 577 | Metadata: &chart.Metadata{Name: "laboratory mice"}, |
| 578 | Templates: []*common.File{ |
| 579 | {Name: "templates/pinky", ModTime: modTime, Data: []byte("pinky")}, |
| 580 | {Name: "templates/brain", ModTime: modTime, Data: []byte("brain")}, |
| 581 | }, |
| 582 | } |
| 583 | ch1.AddDependency(dep1) |
| 584 | |
| 585 | dep2 := &chart.Chart{ |
| 586 | Metadata: &chart.Metadata{Name: "same thing we do every night"}, |
| 587 | Templates: []*common.File{ |
| 588 | {Name: "templates/innermost", ModTime: modTime, Data: []byte("innermost")}, |
| 589 | }, |
| 590 | } |
| 591 | dep1.AddDependency(dep2) |
| 592 | |
| 593 | tpls := allTemplates(ch1, common.Values{}) |
| 594 | if len(tpls) != 5 { |
| 595 | t.Errorf("Expected 5 charts, got %d", len(tpls)) |
| 596 | } |
| 597 | } |
| 598 | |
| 599 | func TestChartValuesContainsIsRoot(t *testing.T) { |
| 600 | modTime := time.Now() |
nothing calls this directly
no test coverage detected
searching dependent graphs…