(t *testing.T, c *chart.Chart)
| 664 | } |
| 665 | |
| 666 | func verifyDependencies(t *testing.T, c *chart.Chart) { |
| 667 | t.Helper() |
| 668 | if len(c.Metadata.Dependencies) != 2 { |
| 669 | t.Errorf("Expected 2 dependencies, got %d", len(c.Metadata.Dependencies)) |
| 670 | } |
| 671 | tests := []*chart.Dependency{ |
| 672 | {Name: "alpine", Version: "0.1.0", Repository: "https://example.com/charts"}, |
| 673 | {Name: "mariner", Version: "4.3.2", Repository: "https://example.com/charts"}, |
| 674 | } |
| 675 | for i, tt := range tests { |
| 676 | d := c.Metadata.Dependencies[i] |
| 677 | if d.Name != tt.Name { |
| 678 | t.Errorf("Expected dependency named %q, got %q", tt.Name, d.Name) |
| 679 | } |
| 680 | if d.Version != tt.Version { |
| 681 | t.Errorf("Expected dependency named %q to have version %q, got %q", tt.Name, tt.Version, d.Version) |
| 682 | } |
| 683 | if d.Repository != tt.Repository { |
| 684 | t.Errorf("Expected dependency named %q to have repository %q, got %q", tt.Name, tt.Repository, d.Repository) |
| 685 | } |
| 686 | } |
| 687 | } |
| 688 | |
| 689 | func verifyDependenciesLock(t *testing.T, c *chart.Chart) { |
| 690 | t.Helper() |
no test coverage detected
searching dependent graphs…