add annotations test

pull/2671/head
Kira 8 years ago
parent 5f92a6a356
commit 6a16b13c70

@ -88,6 +88,18 @@ func verifyChartfile(t *testing.T, f *chart.Metadata, name string) {
t.Error("Unexpected keywords") t.Error("Unexpected keywords")
} }
if len(f.Annotations) != 2 {
t.Fatalf("Unexpected annotations")
}
if value := f.Annotations["extrakey"]; value != "extravalue" {
t.Errorf("Expected extravalue, but got %s", value)
}
if value := f.Annotations["anotherkey"]; value != "anothervalue" {
t.Errorf("Expected anotherkey, but got %s", value)
}
kk := []string{"frobnitz", "sprocket", "dodad"} kk := []string{"frobnitz", "sprocket", "dodad"}
for i, k := range f.Keywords { for i, k := range f.Keywords {
if kk[i] != k { if kk[i] != k {

@ -15,3 +15,6 @@ sources:
- https://example.com/foo/bar - https://example.com/foo/bar
home: http://example.com home: http://example.com
icon: https://example.com/64x64.png icon: https://example.com/64x64.png
annotations:
extrakey: extravalue
anotherkey: anothervalue

Binary file not shown.

@ -15,3 +15,6 @@ sources:
- https://example.com/foo/bar - https://example.com/foo/bar
home: http://example.com home: http://example.com
icon: https://example.com/64x64.png icon: https://example.com/64x64.png
annotations:
extrakey: extravalue
anotherkey: anothervalue

@ -15,3 +15,6 @@ sources:
- https://example.com/foo/bar - https://example.com/foo/bar
home: http://example.com home: http://example.com
icon: https://example.com/64x64.png icon: https://example.com/64x64.png
annotations:
extrakey: extravalue
anotherkey: anothervalue

Loading…
Cancel
Save