Skip to content

Commit fe1173f

Browse files
authored
Merge pull request #1257 from fluxcd/tidy-nits
Address miscellaneous issues throughout code base
2 parents 3cf4fdf + 09772bd commit fe1173f

21 files changed

+129
-154
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ require (
6868
k8s.io/api v0.27.4
6969
k8s.io/apimachinery v0.27.4
7070
k8s.io/client-go v0.27.4
71-
k8s.io/utils v0.0.0-20230505201702-9f6742963106
71+
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
7272
sigs.k8s.io/cli-utils v0.35.0
7373
sigs.k8s.io/controller-runtime v0.15.1
7474
sigs.k8s.io/yaml v1.3.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1808,8 +1808,8 @@ k8s.io/kube-openapi v0.0.0-20230515203736-54b630e78af5 h1:azYPdzztXxPSa8wb+hksEK
18081808
k8s.io/kube-openapi v0.0.0-20230515203736-54b630e78af5/go.mod h1:kzo02I3kQ4BTtEfVLaPbjvCkX97YqGve33wzlb3fofQ=
18091809
k8s.io/kubectl v0.27.3 h1:HyC4o+8rCYheGDWrkcOQHGwDmyLKR5bxXFgpvF82BOw=
18101810
k8s.io/kubectl v0.27.3/go.mod h1:g9OQNCC2zxT+LT3FS09ZYqnDhlvsKAfFq76oyarBcq4=
1811-
k8s.io/utils v0.0.0-20230505201702-9f6742963106 h1:EObNQ3TW2D+WptiYXlApGNLVy0zm/JIBVY9i+M4wpAU=
1812-
k8s.io/utils v0.0.0-20230505201702-9f6742963106/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
1811+
k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI=
1812+
k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
18131813
oras.land/oras-go v1.2.3 h1:v8PJl+gEAntI1pJ/LCrDgsuk+1PKVavVEPsYIHFE5uY=
18141814
oras.land/oras-go v1.2.3/go.mod h1:M/uaPdYklze0Vf3AakfarnpoEckvw0ESbRdN8Z1vdJg=
18151815
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=

internal/controller/bucket_controller_fetch_test.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ type mockBucketClient struct {
4141
objects map[string]mockBucketObject
4242
}
4343

44-
var mockNotFound = fmt.Errorf("not found")
44+
var errMockNotFound = fmt.Errorf("not found")
4545

4646
func (m mockBucketClient) BucketExists(_ context.Context, name string) (bool, error) {
4747
return name == m.bucketName, nil
@@ -57,7 +57,7 @@ func (m mockBucketClient) FGetObject(_ context.Context, bucket, obj, path string
5757
}
5858
object, ok := m.objects[obj]
5959
if !ok {
60-
return "", mockNotFound
60+
return "", errMockNotFound
6161
}
6262
if err := os.WriteFile(path, []byte(object.data), os.FileMode(0660)); err != nil {
6363
return "", err
@@ -66,7 +66,7 @@ func (m mockBucketClient) FGetObject(_ context.Context, bucket, obj, path string
6666
}
6767

6868
func (m mockBucketClient) ObjectIsNotFound(e error) bool {
69-
return e == mockNotFound
69+
return e == errMockNotFound
7070
}
7171

7272
func (m mockBucketClient) VisitObjects(_ context.Context, _ string, f func(key, etag string) error) error {
@@ -78,9 +78,7 @@ func (m mockBucketClient) VisitObjects(_ context.Context, _ string, f func(key,
7878
return nil
7979
}
8080

81-
func (m mockBucketClient) Close(_ context.Context) {
82-
return
83-
}
81+
func (m mockBucketClient) Close(_ context.Context) {}
8482

8583
func (m *mockBucketClient) addObject(key string, object mockBucketObject) {
8684
if m.objects == nil {

internal/controller/bucket_controller_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ func TestBucketReconciler_reconcileStorage(t *testing.T) {
258258
name: "notices missing artifact in storage",
259259
beforeFunc: func(obj *bucketv1.Bucket, storage *Storage) error {
260260
obj.Status.Artifact = &sourcev1.Artifact{
261-
Path: fmt.Sprintf("/reconcile-storage/invalid.txt"),
261+
Path: "/reconcile-storage/invalid.txt",
262262
Revision: "d",
263263
}
264264
storage.SetArtifactURL(obj.Status.Artifact)
@@ -339,7 +339,7 @@ func TestBucketReconciler_reconcileStorage(t *testing.T) {
339339
name: "updates hostname on diff from current",
340340
beforeFunc: func(obj *bucketv1.Bucket, storage *Storage) error {
341341
obj.Status.Artifact = &sourcev1.Artifact{
342-
Path: fmt.Sprintf("/reconcile-storage/hostname.txt"),
342+
Path: "/reconcile-storage/hostname.txt",
343343
Revision: "f",
344344
Digest: "sha256:3b9c358f36f0a31b6ad3e14f309c7cf198ac9246e8316f9ce543d5b19ac02b80",
345345
URL: "http://outdated.com/reconcile-storage/hostname.txt",
@@ -1211,8 +1211,8 @@ func TestBucketReconciler_reconcileArtifact(t *testing.T) {
12111211
// path.
12121212
t.Expect(os.RemoveAll(dir)).ToNot(HaveOccurred())
12131213
f, err := os.Create(dir)
1214-
defer f.Close()
12151214
t.Expect(err).ToNot(HaveOccurred())
1215+
t.Expect(f.Close()).ToNot(HaveOccurred())
12161216
conditions.MarkReconciling(obj, meta.ProgressingReason, "foo")
12171217
conditions.MarkUnknown(obj, meta.ReadyCondition, "foo", "bar")
12181218
},
@@ -1293,6 +1293,7 @@ func TestBucketReconciler_statusConditions(t *testing.T) {
12931293
name string
12941294
beforeFunc func(obj *bucketv1.Bucket)
12951295
assertConditions []metav1.Condition
1296+
wantErr bool
12961297
}{
12971298
{
12981299
name: "positive conditions only",
@@ -1317,6 +1318,7 @@ func TestBucketReconciler_statusConditions(t *testing.T) {
13171318
*conditions.TrueCondition(sourcev1.StorageOperationFailedCondition, sourcev1.DirCreationFailedReason, "failed to create directory"),
13181319
*conditions.TrueCondition(sourcev1.ArtifactOutdatedCondition, "NewRevision", "some error"),
13191320
},
1321+
wantErr: true,
13201322
},
13211323
{
13221324
name: "mixed positive and negative conditions",
@@ -1329,6 +1331,7 @@ func TestBucketReconciler_statusConditions(t *testing.T) {
13291331
*conditions.TrueCondition(sourcev1.FetchFailedCondition, sourcev1.AuthenticationFailedReason, "failed to get secret"),
13301332
*conditions.TrueCondition(sourcev1.ArtifactInStorageCondition, meta.SucceededReason, "stored artifact for revision"),
13311333
},
1334+
wantErr: true,
13321335
},
13331336
}
13341337

@@ -1360,21 +1363,18 @@ func TestBucketReconciler_statusConditions(t *testing.T) {
13601363
}
13611364

13621365
ctx := context.TODO()
1363-
recResult := sreconcile.ResultSuccess
1364-
var retErr error
1365-
13661366
summarizeHelper := summarize.NewHelper(record.NewFakeRecorder(32), serialPatcher)
13671367
summarizeOpts := []summarize.Option{
13681368
summarize.WithConditions(bucketReadyCondition),
1369-
summarize.WithReconcileResult(recResult),
1370-
summarize.WithReconcileError(retErr),
1369+
summarize.WithReconcileResult(sreconcile.ResultSuccess),
13711370
summarize.WithIgnoreNotFound(),
13721371
summarize.WithResultBuilder(sreconcile.AlwaysRequeueResultBuilder{
13731372
RequeueAfter: jitter.JitteredIntervalDuration(obj.GetRequeueAfter()),
13741373
}),
13751374
summarize.WithPatchFieldOwner("source-controller"),
13761375
}
1377-
_, retErr = summarizeHelper.SummarizeAndPatch(ctx, obj, summarizeOpts...)
1376+
_, err := summarizeHelper.SummarizeAndPatch(ctx, obj, summarizeOpts...)
1377+
g.Expect(err != nil).To(Equal(tt.wantErr))
13781378

13791379
key := client.ObjectKeyFromObject(obj)
13801380
g.Expect(c.Get(ctx, key, obj)).ToNot(HaveOccurred())

internal/controller/gitrepository_controller.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import (
3333
"k8s.io/apimachinery/pkg/runtime"
3434
"k8s.io/apimachinery/pkg/types"
3535
kuberecorder "k8s.io/client-go/tools/record"
36-
"k8s.io/utils/pointer"
36+
"k8s.io/utils/ptr"
3737
ctrl "sigs.k8s.io/controller-runtime"
3838
"sigs.k8s.io/controller-runtime/pkg/builder"
3939
"sigs.k8s.io/controller-runtime/pkg/client"
@@ -366,7 +366,7 @@ func (r *GitRepositoryReconciler) shouldNotify(oldObj, newObj *sourcev1.GitRepos
366366
if resErr != nil && res == sreconcile.ResultEmpty && newObj.Status.Artifact != nil {
367367
// Convert to Generic error and check for ignore.
368368
if ge, ok := resErr.(*serror.Generic); ok {
369-
return ge.Ignore == true
369+
return ge.Ignore
370370
}
371371
}
372372
return false
@@ -521,7 +521,7 @@ func (r *GitRepositoryReconciler) reconcileSource(ctx context.Context, sp *patch
521521

522522
// Observe if the artifacts still match the previous included ones
523523
if artifacts.Diff(obj.Status.IncludedArtifacts) {
524-
message := fmt.Sprintf("included artifacts differ from last observed includes")
524+
message := "included artifacts differ from last observed includes"
525525
if obj.Status.IncludedArtifacts != nil {
526526
conditions.MarkTrue(obj, sourcev1.ArtifactOutdatedCondition, "IncludeChange", message)
527527
}
@@ -1106,7 +1106,7 @@ func (r *GitRepositoryReconciler) eventLogf(ctx context.Context, obj runtime.Obj
11061106
// changed and requires rebuilding the artifact. Rebuilding the artifact is also
11071107
// required if the object needs to be (re)verified.
11081108
func gitContentConfigChanged(obj *sourcev1.GitRepository, includes *artifactSet) bool {
1109-
if !pointer.StringEqual(obj.Spec.Ignore, obj.Status.ObservedIgnore) {
1109+
if !ptr.Equal(obj.Spec.Ignore, obj.Status.ObservedIgnore) {
11101110
return true
11111111
}
11121112
if obj.Spec.RecurseSubmodules != obj.Status.ObservedRecurseSubmodules {

internal/controller/gitrepository_controller_test.go

Lines changed: 47 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import (
4040
corev1 "k8s.io/api/core/v1"
4141
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
4242
"k8s.io/client-go/tools/record"
43-
"k8s.io/utils/pointer"
43+
"k8s.io/utils/ptr"
4444
kstatus "sigs.k8s.io/cli-utils/pkg/kstatus/status"
4545
ctrl "sigs.k8s.io/controller-runtime"
4646
"sigs.k8s.io/controller-runtime/pkg/client"
@@ -827,7 +827,7 @@ func TestGitRepositoryReconciler_reconcileSource_checkoutStrategy(t *testing.T)
827827
},
828828
beforeFunc: func(obj *sourcev1.GitRepository, latestRev string) {
829829
// Set new ignore value.
830-
obj.Spec.Ignore = pointer.StringPtr("foo")
830+
obj.Spec.Ignore = ptr.To("foo")
831831
// Add existing artifact on the object and storage.
832832
obj.Status = sourcev1.GitRepositoryStatus{
833833
Artifact: &sourcev1.Artifact{
@@ -1001,7 +1001,7 @@ func TestGitRepositoryReconciler_reconcileArtifact(t *testing.T) {
10011001
dir: "testdata/git/repository",
10021002
beforeFunc: func(obj *sourcev1.GitRepository) {
10031003
obj.Spec.Interval = metav1.Duration{Duration: interval}
1004-
obj.Spec.Ignore = pointer.StringPtr("!**.txt\n")
1004+
obj.Spec.Ignore = ptr.To("!**.txt\n")
10051005
},
10061006
afterFunc: func(t *WithT, obj *sourcev1.GitRepository) {
10071007
t.Expect(obj.GetArtifact()).ToNot(BeNil())
@@ -1849,6 +1849,41 @@ func TestGitRepositoryReconciler_verifySignature(t *testing.T) {
18491849
*conditions.FalseCondition(sourcev1.SourceVerifiedCondition, "InvalidCommitSignature", "signature verification of commit 'shasum' failed: unable to verify Git commit: unable to verify payload with any of the given key rings"),
18501850
},
18511851
},
1852+
{
1853+
name: "Invalid tag signature with mode=tag makes SourceVerifiedCondition=False",
1854+
secret: &corev1.Secret{
1855+
ObjectMeta: metav1.ObjectMeta{
1856+
Name: "existing",
1857+
},
1858+
Data: map[string][]byte{
1859+
"foo": []byte(armoredKeyRingFixture),
1860+
},
1861+
},
1862+
commit: git.Commit{
1863+
ReferencingTag: &git.Tag{
1864+
Name: "v0.1.0",
1865+
Hash: []byte("shasum"),
1866+
Encoded: []byte(malformedEncodedTagFixture),
1867+
Signature: signatureTagFixture,
1868+
},
1869+
},
1870+
beforeFunc: func(obj *sourcev1.GitRepository) {
1871+
obj.Spec.Reference = &sourcev1.GitRepositoryRef{
1872+
Tag: "v0.1.0",
1873+
}
1874+
obj.Spec.Interval = metav1.Duration{Duration: interval}
1875+
obj.Spec.Verification = &sourcev1.GitRepositoryVerification{
1876+
Mode: sourcev1.ModeGitTag,
1877+
SecretRef: meta.LocalObjectReference{
1878+
Name: "existing",
1879+
},
1880+
}
1881+
},
1882+
wantErr: true,
1883+
assertConditions: []metav1.Condition{
1884+
*conditions.FalseCondition(sourcev1.SourceVerifiedCondition, "InvalidTagSignature", "signature verification of tag 'v0.1.0@shasum' failed: unable to verify Git tag: unable to verify payload with any of the given key rings"),
1885+
},
1886+
},
18521887
{
18531888
name: "Invalid PGP key makes SourceVerifiedCondition=False and returns error",
18541889
secret: &corev1.Secret{
@@ -2328,6 +2363,7 @@ func TestGitRepositoryReconciler_statusConditions(t *testing.T) {
23282363
name string
23292364
beforeFunc func(obj *sourcev1.GitRepository)
23302365
assertConditions []metav1.Condition
2366+
wantErr bool
23312367
}{
23322368
{
23332369
name: "multiple positive conditions",
@@ -2356,6 +2392,7 @@ func TestGitRepositoryReconciler_statusConditions(t *testing.T) {
23562392
*conditions.TrueCondition(sourcev1.StorageOperationFailedCondition, sourcev1.DirCreationFailedReason, "failed to create directory"),
23572393
*conditions.TrueCondition(sourcev1.ArtifactOutdatedCondition, "NewRevision", "some error"),
23582394
},
2395+
wantErr: true,
23592396
},
23602397
{
23612398
name: "mixed positive and negative conditions",
@@ -2368,6 +2405,7 @@ func TestGitRepositoryReconciler_statusConditions(t *testing.T) {
23682405
*conditions.TrueCondition(sourcev1.FetchFailedCondition, sourcev1.AuthenticationFailedReason, "failed to get secret"),
23692406
*conditions.TrueCondition(sourcev1.ArtifactInStorageCondition, meta.SucceededReason, "stored artifact for revision"),
23702407
},
2408+
wantErr: true,
23712409
},
23722410
}
23732411

@@ -2400,22 +2438,19 @@ func TestGitRepositoryReconciler_statusConditions(t *testing.T) {
24002438
}
24012439

24022440
ctx := context.TODO()
2403-
recResult := sreconcile.ResultSuccess
2404-
var retErr error
2405-
24062441
summarizeHelper := summarize.NewHelper(record.NewFakeRecorder(32), serialPatcher)
24072442
summarizeOpts := []summarize.Option{
24082443
summarize.WithConditions(gitRepositoryReadyCondition),
24092444
summarize.WithBiPolarityConditionTypes(sourcev1.SourceVerifiedCondition),
2410-
summarize.WithReconcileResult(recResult),
2411-
summarize.WithReconcileError(retErr),
2445+
summarize.WithReconcileResult(sreconcile.ResultSuccess),
24122446
summarize.WithIgnoreNotFound(),
24132447
summarize.WithResultBuilder(sreconcile.AlwaysRequeueResultBuilder{
24142448
RequeueAfter: jitter.JitteredIntervalDuration(obj.GetRequeueAfter()),
24152449
}),
24162450
summarize.WithPatchFieldOwner("source-controller"),
24172451
}
2418-
_, retErr = summarizeHelper.SummarizeAndPatch(ctx, obj, summarizeOpts...)
2452+
_, err := summarizeHelper.SummarizeAndPatch(ctx, obj, summarizeOpts...)
2453+
g.Expect(err != nil).To(Equal(tt.wantErr))
24192454

24202455
key := client.ObjectKeyFromObject(obj)
24212456
g.Expect(c.Get(ctx, key, obj)).ToNot(HaveOccurred())
@@ -2833,15 +2868,15 @@ func TestGitContentConfigChanged(t *testing.T) {
28332868
{
28342869
name: "unobserved ignore",
28352870
obj: sourcev1.GitRepository{
2836-
Spec: sourcev1.GitRepositorySpec{Ignore: pointer.String("foo")},
2871+
Spec: sourcev1.GitRepositorySpec{Ignore: ptr.To("foo")},
28372872
},
28382873
want: true,
28392874
},
28402875
{
28412876
name: "observed ignore",
28422877
obj: sourcev1.GitRepository{
2843-
Spec: sourcev1.GitRepositorySpec{Ignore: pointer.String("foo")},
2844-
Status: sourcev1.GitRepositoryStatus{ObservedIgnore: pointer.String("foo")},
2878+
Spec: sourcev1.GitRepositorySpec{Ignore: ptr.To("foo")},
2879+
Status: sourcev1.GitRepositoryStatus{ObservedIgnore: ptr.To("foo")},
28452880
},
28462881
want: false,
28472882
},

internal/controller/helmchart_controller.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,9 +1129,9 @@ func (r *HelmChartReconciler) requestsForHelmRepositoryChange(ctx context.Contex
11291129
}
11301130

11311131
var reqs []reconcile.Request
1132-
for _, i := range list.Items {
1133-
if i.Status.ObservedSourceArtifactRevision != repo.GetArtifact().Revision {
1134-
reqs = append(reqs, reconcile.Request{NamespacedName: client.ObjectKeyFromObject(&i)})
1132+
for i, v := range list.Items {
1133+
if v.Status.ObservedSourceArtifactRevision != repo.GetArtifact().Revision {
1134+
reqs = append(reqs, reconcile.Request{NamespacedName: client.ObjectKeyFromObject(&list.Items[i])})
11351135
}
11361136
}
11371137
return reqs
@@ -1159,9 +1159,9 @@ func (r *HelmChartReconciler) requestsForGitRepositoryChange(ctx context.Context
11591159
}
11601160

11611161
var reqs []reconcile.Request
1162-
for _, i := range list.Items {
1163-
if !repo.GetArtifact().HasRevision(i.Status.ObservedSourceArtifactRevision) {
1164-
reqs = append(reqs, reconcile.Request{NamespacedName: client.ObjectKeyFromObject(&i)})
1162+
for i, v := range list.Items {
1163+
if !repo.GetArtifact().HasRevision(v.Status.ObservedSourceArtifactRevision) {
1164+
reqs = append(reqs, reconcile.Request{NamespacedName: client.ObjectKeyFromObject(&list.Items[i])})
11651165
}
11661166
}
11671167
return reqs
@@ -1189,9 +1189,9 @@ func (r *HelmChartReconciler) requestsForBucketChange(ctx context.Context, o cli
11891189
}
11901190

11911191
var reqs []reconcile.Request
1192-
for _, i := range list.Items {
1193-
if !bucket.GetArtifact().HasRevision(i.Status.ObservedSourceArtifactRevision) {
1194-
reqs = append(reqs, reconcile.Request{NamespacedName: client.ObjectKeyFromObject(&i)})
1192+
for i, v := range list.Items {
1193+
if !bucket.GetArtifact().HasRevision(v.Status.ObservedSourceArtifactRevision) {
1194+
reqs = append(reqs, reconcile.Request{NamespacedName: client.ObjectKeyFromObject(&list.Items[i])})
11951195
}
11961196
}
11971197
return reqs

internal/controller/helmchart_controller_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2029,6 +2029,7 @@ func TestHelmChartReconciler_statusConditions(t *testing.T) {
20292029
name string
20302030
beforeFunc func(obj *helmv1.HelmChart)
20312031
assertConditions []metav1.Condition
2032+
wantErr bool
20322033
}{
20332034
{
20342035
name: "positive conditions only",
@@ -2055,6 +2056,7 @@ func TestHelmChartReconciler_statusConditions(t *testing.T) {
20552056
*conditions.TrueCondition(sourcev1.BuildFailedCondition, "ChartPackageError", "some error"),
20562057
*conditions.TrueCondition(sourcev1.ArtifactOutdatedCondition, "NewRevision", "some error"),
20572058
},
2059+
wantErr: true,
20582060
},
20592061
{
20602062
name: "mixed positive and negative conditions",
@@ -2067,6 +2069,7 @@ func TestHelmChartReconciler_statusConditions(t *testing.T) {
20672069
*conditions.TrueCondition(sourcev1.FetchFailedCondition, sourcev1.AuthenticationFailedReason, "failed to get secret"),
20682070
*conditions.TrueCondition(sourcev1.ArtifactInStorageCondition, meta.SucceededReason, "stored artifact for revision"),
20692071
},
2072+
wantErr: true,
20702073
},
20712074
}
20722075

@@ -2098,22 +2101,19 @@ func TestHelmChartReconciler_statusConditions(t *testing.T) {
20982101
}
20992102

21002103
ctx := context.TODO()
2101-
recResult := sreconcile.ResultSuccess
2102-
var retErr error
2103-
21042104
summarizeHelper := summarize.NewHelper(record.NewFakeRecorder(32), serialPatcher)
21052105
summarizeOpts := []summarize.Option{
21062106
summarize.WithConditions(helmChartReadyCondition),
21072107
summarize.WithBiPolarityConditionTypes(sourcev1.SourceVerifiedCondition),
2108-
summarize.WithReconcileResult(recResult),
2109-
summarize.WithReconcileError(retErr),
2108+
summarize.WithReconcileResult(sreconcile.ResultSuccess),
21102109
summarize.WithIgnoreNotFound(),
21112110
summarize.WithResultBuilder(sreconcile.AlwaysRequeueResultBuilder{
21122111
RequeueAfter: jitter.JitteredIntervalDuration(obj.GetRequeueAfter()),
21132112
}),
21142113
summarize.WithPatchFieldOwner("source-controller"),
21152114
}
2116-
_, retErr = summarizeHelper.SummarizeAndPatch(ctx, obj, summarizeOpts...)
2115+
_, err := summarizeHelper.SummarizeAndPatch(ctx, obj, summarizeOpts...)
2116+
g.Expect(err != nil).To(Equal(tt.wantErr))
21172117

21182118
key := client.ObjectKeyFromObject(obj)
21192119
g.Expect(c.Get(ctx, key, obj)).ToNot(HaveOccurred())

0 commit comments

Comments
 (0)