nolint:dupl,lll
(ctx context.Context, nss types.NamespacedName, objects []client.Object, annotations map[string]string)
| 194 | |
| 195 | //nolint:dupl,lll |
| 196 | func assertAnnotationsOnObjects(ctx context.Context, nss types.NamespacedName, objects []client.Object, annotations map[string]string) { |
| 197 | GinkgoHelper() |
| 198 | for idx, obj := range objects { |
| 199 | Expect(k8sClient.Get(ctx, nss, obj)).ToNot(HaveOccurred()) |
| 200 | gotAnnotations := obj.GetAnnotations() |
| 201 | for k, v := range annotations { |
| 202 | gv, ok := gotAnnotations[k] |
| 203 | if v == "" { |
| 204 | Expect(ok).To(BeFalse(), "annotation key=%q,value=%q must not exist for %T at idx=%d, object=%q", k, gv, obj, idx, nss.String()) |
| 205 | } else { |
| 206 | Expect(ok).To(BeTrue(), "annotation key=%s must present for %T at idx=%d, object=%q", k, obj, idx, nss.String()) |
| 207 | Expect(gv).To(Equal(v), "annotation key=%s must equal for %T at idx=%d, object=%q", k, obj, idx, nss.String()) |
| 208 | |
| 209 | } |
| 210 | |
| 211 | } |
| 212 | } |
| 213 | } |
| 214 | |
| 215 | //nolint:dupl,lll |
| 216 | func assertLabelsOnObjects(ctx context.Context, nss types.NamespacedName, objects []client.Object, wantLabels map[string]string) { |
no test coverage detected