From bf840a8460d10d91840de75e960ad94f55086944 Mon Sep 17 00:00:00 2001 From: Kira Date: Fri, 14 Jul 2017 10:06:49 +0800 Subject: [PATCH] refactor annotations test --- pkg/chartutil/chartfile_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/chartutil/chartfile_test.go b/pkg/chartutil/chartfile_test.go index f17a86701..5b36dc955 100755 --- a/pkg/chartutil/chartfile_test.go +++ b/pkg/chartutil/chartfile_test.go @@ -92,12 +92,12 @@ func verifyChartfile(t *testing.T, f *chart.Metadata, name string) { t.Fatalf("Unexpected annotations") } - if value := f.Annotations["extrakey"]; value != "extravalue" { - t.Errorf("Expected extravalue, but got %s", value) + if want, got := "extravalue", f.Annotations["extrakey"]; want != got { + t.Errorf("Want %q, but got %q", want, got) } - if value := f.Annotations["anotherkey"]; value != "anothervalue" { - t.Errorf("Expected anotherkey, but got %s", value) + if want, got := "anothervalue", f.Annotations["anotherkey"]; want != got { + t.Errorf("Want %q, but got %q", want, got) } kk := []string{"frobnitz", "sprocket", "dodad"}