Skip to content

Commit a01d205

Browse files
authored
Bump ci lint and mockery version (kptdev#469)
Signed-off-by: aravind.est <aravindhan.a@est.tech>
1 parent 19f11d0 commit a01d205

9 files changed

Lines changed: 43 additions & 30 deletions

File tree

make/go.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2025 The Nephio Authors.
1+
# Copyright 2025-2026 The Nephio Authors.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414

1515
# Core Go development tools
1616

17-
GOLANG_CI_VER ?= v2.4.0
17+
GOLANG_CI_VER ?= v2.10.1
1818

1919
##@ Go Development
2020

make/mocks.mk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2025 The Nephio Authors.
1+
# Copyright 2025-2026 The Nephio Authors.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -14,7 +14,8 @@
1414

1515
# Mock generation tools
1616

17-
MOCKERY_VERSION=3.6.3
17+
MOCKERY_VERSION=3.6.4
18+
1819
OS_ARCH ?= $(shell uname -m)
1920
OS ?= $(shell uname)
2021

pkg/cache/testutil/fake_client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 The kpt and Nephio Authors
1+
// Copyright 2025-2026 The kpt and Nephio Authors
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -72,4 +72,4 @@ func (f *FakeClientWithStatusUpdate) Watch(ctx context.Context, list client.Obje
7272

7373
func (f *FakeClientWithStatusUpdate) GetStatusStore() map[types.NamespacedName]configapi.RepositoryStatus {
7474
return f.statusStore
75-
}
75+
}

pkg/registry/porch/watch_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2022, 2024-2025 The kpt and Nephio Authors
1+
// Copyright 2022, 2024-2026 The kpt and Nephio Authors
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -339,13 +339,13 @@ func TestWatcherPeriodicBookmark(t *testing.T) {
339339

340340
done:
341341
require.GreaterOrEqual(t, len(bookmarks), 2, "Expected at least 2 bookmarks (initial + periodic)")
342-
342+
343343
// First should be initial bookmark
344344
if obj, ok := bookmarks[0].Object.(*porchapi.PackageRevision); ok {
345345
assert.NotNil(t, obj.Annotations)
346346
assert.Equal(t, "true", obj.Annotations["k8s.io/initial-events-end"])
347347
}
348-
348+
349349
// Second should be periodic bookmark without annotation
350350
if obj, ok := bookmarks[1].Object.(*porchapi.PackageRevision); ok {
351351
assert.Empty(t, obj.Annotations, "Periodic bookmark should not have annotations")

test/e2e/api/concurrent_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 The kpt and Nephio Authors
1+
// Copyright 2025-2026 The kpt and Nephio Authors
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -356,4 +356,4 @@ func (t *PorchSuite) proposeAndApprovePackage(pr *porchapi.PackageRevision) {
356356
t.UpdateF(pr)
357357
pr.Spec.Lifecycle = porchapi.PackageRevisionLifecyclePublished
358358
t.UpdateApprovalF(pr, metav1.UpdateOptions{})
359-
}
359+
}

test/e2e/api/repository_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 The kpt and Nephio Authors
1+
// Copyright 2025-2026 The kpt and Nephio Authors
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -305,4 +305,4 @@ func (t *PorchSuite) TestPackageRevisionListWithHangingRepository() {
305305
if !found {
306306
t.Errorf("Expected PackageRevisions from working repository, got none")
307307
}
308-
}
308+
}

test/e2e/api/rpkg_metadata_test.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 The kpt and Nephio Authors
1+
// Copyright 2025-2026 The kpt and Nephio Authors
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -36,10 +36,10 @@ var (
3636
)
3737

3838
type MetadataTestCase struct {
39-
Name string
40-
RepoName string
41-
Setup func(*PorchSuite, string) *porchapi.PackageRevision
42-
Validate func(*PorchSuite, *porchapi.PackageRevision)
39+
Name string
40+
RepoName string
41+
Setup func(*PorchSuite, string) *porchapi.PackageRevision
42+
Validate func(*PorchSuite, *porchapi.PackageRevision)
4343
}
4444

4545
func (t *PorchSuite) TestPackageRevisionMetadata() {
@@ -80,27 +80,27 @@ func (t *PorchSuite) TestPackageRevisionMetadata() {
8080
pr.Spec.Lifecycle = porchapi.PackageRevisionLifecycleProposed
8181
t.UpdateF(pr)
8282
t.GetF(client.ObjectKey{Namespace: pr.Namespace, Name: pr.Name}, pr)
83-
83+
8484
t.ValidateLabelsAndAnnos(pr.Name, map[string]string{"kpt.dev/label": "foo"}, map[string]string{"kpt.dev/anno": "foo", "kpt.dev/other-anno": "bar"})
8585
pr.Spec.Lifecycle = porchapi.PackageRevisionLifecyclePublished
8686
t.UpdateApprovalF(pr, metav1.UpdateOptions{})
87-
87+
8888
t.ValidateLabelsAndAnnos(pr.Name, map[string]string{"kpt.dev/label": "foo", porchapi.LatestPackageRevisionKey: porchapi.LatestPackageRevisionValue}, map[string]string{"kpt.dev/anno": "foo", "kpt.dev/other-anno": "bar"})
8989
t.GetF(client.ObjectKey{Namespace: pr.Namespace, Name: pr.Name}, pr)
9090
delete(pr.Labels, "kpt.dev/label")
9191
pr.Labels["kpt.dev/other-label"] = "bar"
9292
delete(pr.Annotations, "kpt.dev/other-anno")
9393
pr.Spec.Revision = 1
9494
t.UpdateF(pr)
95-
95+
9696
t.ValidateLabelsAndAnnos(pr.Name, map[string]string{"kpt.dev/other-label": "bar", porchapi.LatestPackageRevisionKey: porchapi.LatestPackageRevisionValue}, map[string]string{"kpt.dev/anno": "foo"})
9797
clonedPr := t.CreatePackageSkeleton(pr.Spec.RepositoryName, "cloned-package", defaultWorkspace)
9898
clonedPr.Spec.Tasks = []porchapi.Task{{
9999
Type: porchapi.TaskTypeClone,
100100
Clone: &porchapi.PackageCloneTaskSpec{Upstream: porchapi.UpstreamPackage{UpstreamRef: &porchapi.PackageRevisionRef{Name: pr.Name}}},
101101
}}
102102
t.CreateF(clonedPr)
103-
103+
104104
t.ValidateLabelsAndAnnos(clonedPr.Name, map[string]string{}, map[string]string{})
105105
},
106106
},
@@ -152,10 +152,10 @@ func (t *PorchSuite) TestPackageRevisionGarbageCollection() {
152152
t.RegisterGitRepositoryF(t.GetPorchTestRepoURL(), repoName, "", suiteutils.GiteaUser, suiteutils.GiteaPassword)
153153
pr := t.CreatePackageDraftF(repoName, "empty-package", "test-workspace")
154154
cm := &corev1.ConfigMap{
155-
TypeMeta: metav1.TypeMeta{Kind: configMapGVK.Kind, APIVersion: configMapGVK.GroupVersion().String()},
155+
TypeMeta: metav1.TypeMeta{Kind: configMapGVK.Kind, APIVersion: configMapGVK.GroupVersion().String()},
156156
ObjectMeta: metav1.ObjectMeta{Name: "cm-cascades", Namespace: t.Namespace, OwnerReferences: []metav1.OwnerReference{
157157
{APIVersion: porchapi.SchemeGroupVersion.String(), Kind: suiteutils.PackageRevisionGVK.Kind, Name: pr.Name, UID: pr.UID}}},
158-
Data: map[string]string{"foo": "bar"},
158+
Data: map[string]string{"foo": "bar"},
159159
}
160160
t.CreateF(cm)
161161
t.DeleteF(pr)
@@ -409,4 +409,4 @@ func (t *PorchSuite) TestPackageRevisionFinalizers() {
409409
readPR.Finalizers = []string{}
410410
t.UpdateF(readPR)
411411
t.WaitUntilObjectDeleted(suiteutils.PackageRevisionGVK, types.NamespacedName{Name: readPR.Name, Namespace: readPR.Namespace}, 10*time.Second)
412-
}
412+
}

test/e2e/performance/performance_suite.go

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2025-2026 The kpt and Nephio Authors
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
package performance
216

317
import (
@@ -213,4 +227,4 @@ func (t *PerformanceSuite) CreatePackageDraftF(repository, packageName, workspac
213227
}
214228
t.CreateF(pr)
215229
return pr
216-
}
230+
}

test/e2e/suiteutils/git_stub_test_utils.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 The kpt and Nephio Authors
1+
// Copyright 2025-2026 The kpt and Nephio Authors
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -307,8 +307,6 @@ func createLocalGitServer(t *testing.T) GitConfig {
307307
}
308308
}
309309

310-
311-
312310
func InferGitServerImage(porchImage string) string {
313311
slash := strings.LastIndex(porchImage, "/")
314312
repo := porchImage[:slash+1]
@@ -334,4 +332,4 @@ func endpointIsReady(endpoints *coreapi.Endpoints) bool {
334332
}
335333
}
336334
return true
337-
}
335+
}

0 commit comments

Comments
 (0)