Esempio n. 1
0
func checkAnnotations(t *testing.T, expected types.Annotations, actual []*v1alpha.KeyValue) {
	if len(expected) != len(actual) {
		t.Fatalf("Expected annotation counts to equal, expected %d, got %d", len(expected), len(actual))
	}
	for _, a := range actual {
		val, ok := expected.Get(a.Key)
		if !ok {
			t.Fatalf("Expected annotation for key %q, got nothing", a.Key)
		}
		if val != a.Value {
			t.Fatalf("Incorrect Annotation value, expected %q, got %q", val, a.Value)
		}
	}
}