(t *testing.T, f *chart.Metadata, name string)
| 34 | } |
| 35 | |
| 36 | func verifyChartfile(t *testing.T, f *chart.Metadata, name string) { |
| 37 | t.Helper() |
| 38 | if f == nil { |
| 39 | t.Fatal("Failed verifyChartfile because f is nil") |
| 40 | } |
| 41 | |
| 42 | if f.APIVersion != chart.APIVersionV1 { |
| 43 | t.Errorf("Expected API Version %q, got %q", chart.APIVersionV1, f.APIVersion) |
| 44 | } |
| 45 | |
| 46 | if f.Name != name { |
| 47 | t.Errorf("Expected %s, got %s", name, f.Name) |
| 48 | } |
| 49 | |
| 50 | if f.Description != "This is a frobnitz." { |
| 51 | t.Errorf("Unexpected description %q", f.Description) |
| 52 | } |
| 53 | |
| 54 | if f.Version != "1.2.3" { |
| 55 | t.Errorf("Unexpected version %q", f.Version) |
| 56 | } |
| 57 | |
| 58 | if len(f.Maintainers) != 2 { |
| 59 | t.Errorf("Expected 2 maintainers, got %d", len(f.Maintainers)) |
| 60 | } |
| 61 | |
| 62 | if f.Maintainers[0].Name != "The Helm Team" { |
| 63 | t.Error("Unexpected maintainer name.") |
| 64 | } |
| 65 | |
| 66 | if f.Maintainers[1].Email != "nobody@example.com" { |
| 67 | t.Error("Unexpected maintainer email.") |
| 68 | } |
| 69 | |
| 70 | if len(f.Sources) != 1 { |
| 71 | t.Fatal("Unexpected number of sources") |
| 72 | } |
| 73 | |
| 74 | if f.Sources[0] != "https://example.com/foo/bar" { |
| 75 | t.Errorf("Expected https://example.com/foo/bar, got %s", f.Sources) |
| 76 | } |
| 77 | |
| 78 | if f.Home != "http://example.com" { |
| 79 | t.Error("Unexpected home.") |
| 80 | } |
| 81 | |
| 82 | if f.Icon != "https://example.com/64x64.png" { |
| 83 | t.Errorf("Unexpected icon: %q", f.Icon) |
| 84 | } |
| 85 | |
| 86 | if len(f.Keywords) != 3 { |
| 87 | t.Error("Unexpected keywords") |
| 88 | } |
| 89 | |
| 90 | if len(f.Annotations) != 2 { |
| 91 | t.Fatal("Unexpected annotations") |
| 92 | } |
| 93 |
no test coverage detected
searching dependent graphs…