From 525afcca5ff1c385d40f10db961a3bea1a12f03f Mon Sep 17 00:00:00 2001 From: ira-pandey1 Date: Fri, 7 Mar 2025 14:43:26 +0530 Subject: [PATCH 1/6] Added test cases for list.go and github.go --- hack/tools/release/notes/list_test.go | 140 ++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) diff --git a/hack/tools/release/notes/list_test.go b/hack/tools/release/notes/list_test.go index 688abc9a1c0e..d74b4ae75833 100644 --- a/hack/tools/release/notes/list_test.go +++ b/hack/tools/release/notes/list_test.go @@ -65,3 +65,143 @@ func Test_buildSetOfPRNumbers(t *testing.T) { }) } } + +func Test_githubFromToPRLister_listPRs(t *testing.T) { + type fields struct { + client *githubClient + fromRef *ref + toRef *ref + branch string + } + type args struct { + previousReleaseRef ref + } + tests := []struct { + name string + fields *githubFromToPRLister + args ref + wantErr bool + }{ + { + name: "Successful PR Listing", + fields: &githubFromToPRLister{ + client: &githubClient{ + repo: "kubernetes-sigs/kind", + }, + fromRef: ref{ + reType: "tags", + value: "v0.26.0", + }, + toRef: ref{ + reType: "tags", + value: "v0.27.0", + }, + branch: "main", + }, + args: ref{ + reType: "tags", + value: "v0.26.0", + }, + wantErr: false, + }, + { + name: "Setting previousReleaseRef.value blank - should use toRef and fromRef from fields", + fields: &githubFromToPRLister{ + client: &githubClient{ + repo: "kubernetes-sigs/kind", + }, + fromRef: ref{ + reType: "tags", + value: "v0.26.0", + }, + toRef: ref{ + reType: "tags", + value: "v0.27.0", + }, + branch: "main", + }, + args: ref{ + reType: "tags", + value: "", + }, + wantErr: false, + }, + { + name: "Create PR List when fromRef is not set", + fields: &githubFromToPRLister{ + client: &githubClient{ + repo: "kubernetes-sigs/kind", + }, + toRef: ref{ + reType: "tags", + value: "v0.27.0", + }, + branch: "main", + }, + args: ref{ + reType: "tags", + value: "v0.26.0", + }, + wantErr: false, + }, + { + name: "Fail when previousReleaseRef.value is set to invalid", + fields: &githubFromToPRLister{ + client: &githubClient{ + repo: "kubernetes-sigs/kind", + }, + fromRef: ref{ + reType: "tags", + value: "v0.26.0", + }, + toRef: ref{ + reType: "tags", + value: "v0.27.0", + }, + branch: "main", + }, + args: ref{ + reType: "tags", + value: "invalid", + }, + wantErr: true, + }, + { + name: "Fail when toRef and previousReleaseRef set blank", + fields: &githubFromToPRLister{ + client: &githubClient{ + repo: "kubernetes-sigs/kind", + }, + fromRef: ref{ + reType: "tags", + value: "v0.26.0", + }, + toRef: ref{ + reType: "tags", + value: "", + }, + branch: "main", + }, + args: ref{ + reType: "tags", + value: "", + }, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + l := &githubFromToPRLister{ + client: tt.fields.client, + fromRef: tt.fields.fromRef, + toRef: tt.fields.toRef, + branch: tt.fields.branch, + } + _, err := l.listPRs(tt.args) + if (err != nil) != tt.wantErr { + t.Errorf("githubFromToPRLister.listPRs() error = %v, wantErr %v", err, tt.wantErr) + return + } + }) + } +} From 25ff8d858a6e7da59e71528ae925db4ef295d6aa Mon Sep 17 00:00:00 2001 From: ira-pandey1 Date: Wed, 26 Mar 2025 10:52:14 +0530 Subject: [PATCH 2/6] Linting issues fixed --- hack/tools/release/notes/list_test.go | 67 ++++++++++++--------------- 1 file changed, 29 insertions(+), 38 deletions(-) diff --git a/hack/tools/release/notes/list_test.go b/hack/tools/release/notes/list_test.go index d74b4ae75833..c5848e236d9f 100644 --- a/hack/tools/release/notes/list_test.go +++ b/hack/tools/release/notes/list_test.go @@ -67,15 +67,6 @@ func Test_buildSetOfPRNumbers(t *testing.T) { } func Test_githubFromToPRLister_listPRs(t *testing.T) { - type fields struct { - client *githubClient - fromRef *ref - toRef *ref - branch string - } - type args struct { - previousReleaseRef ref - } tests := []struct { name string fields *githubFromToPRLister @@ -85,106 +76,106 @@ func Test_githubFromToPRLister_listPRs(t *testing.T) { { name: "Successful PR Listing", fields: &githubFromToPRLister{ - client: &githubClient{ - repo: "kubernetes-sigs/kind", + client: &githubClient{ + repo: "kubernetes-sigs/kind", }, fromRef: ref{ reType: "tags", - value: "v0.26.0", + value: "v0.26.0", }, toRef: ref{ reType: "tags", - value: "v0.27.0", + value: "v0.27.0", }, - branch: "main", + branch: "main", }, args: ref{ reType: "tags", - value: "v0.26.0", + value: "v0.26.0", }, wantErr: false, }, { name: "Setting previousReleaseRef.value blank - should use toRef and fromRef from fields", fields: &githubFromToPRLister{ - client: &githubClient{ - repo: "kubernetes-sigs/kind", + client: &githubClient{ + repo: "kubernetes-sigs/kind", }, fromRef: ref{ reType: "tags", - value: "v0.26.0", + value: "v0.26.0", }, toRef: ref{ reType: "tags", - value: "v0.27.0", + value: "v0.27.0", }, - branch: "main", + branch: "main", }, args: ref{ reType: "tags", - value: "", + value: "", }, wantErr: false, }, { name: "Create PR List when fromRef is not set", fields: &githubFromToPRLister{ - client: &githubClient{ - repo: "kubernetes-sigs/kind", + client: &githubClient{ + repo: "kubernetes-sigs/kind", }, toRef: ref{ reType: "tags", - value: "v0.27.0", + value: "v0.27.0", }, - branch: "main", + branch: "main", }, args: ref{ reType: "tags", - value: "v0.26.0", + value: "v0.26.0", }, wantErr: false, }, { name: "Fail when previousReleaseRef.value is set to invalid", fields: &githubFromToPRLister{ - client: &githubClient{ - repo: "kubernetes-sigs/kind", + client: &githubClient{ + repo: "kubernetes-sigs/kind", }, fromRef: ref{ reType: "tags", - value: "v0.26.0", + value: "v0.26.0", }, toRef: ref{ reType: "tags", - value: "v0.27.0", + value: "v0.27.0", }, - branch: "main", + branch: "main", }, args: ref{ reType: "tags", - value: "invalid", + value: "invalid", }, wantErr: true, }, { name: "Fail when toRef and previousReleaseRef set blank", fields: &githubFromToPRLister{ - client: &githubClient{ - repo: "kubernetes-sigs/kind", + client: &githubClient{ + repo: "kubernetes-sigs/kind", }, fromRef: ref{ reType: "tags", - value: "v0.26.0", + value: "v0.26.0", }, toRef: ref{ reType: "tags", - value: "", + value: "", }, - branch: "main", + branch: "main", }, args: ref{ reType: "tags", - value: "", + value: "", }, wantErr: true, }, From a74a438578e59b1de1c324ae48d84cadf69375c9 Mon Sep 17 00:00:00 2001 From: ira-pandey1 Date: Mon, 4 Aug 2025 14:21:37 +0530 Subject: [PATCH 3/6] mock github and fix test cases --- hack/tools/release/notes/github.go | 12 ++ hack/tools/release/notes/list.go | 12 +- hack/tools/release/notes/list_test.go | 107 +++++----------- hack/tools/release/notes/mock_github.go | 158 ++++++++++++++++++++++++ 4 files changed, 214 insertions(+), 75 deletions(-) create mode 100644 hack/tools/release/notes/mock_github.go diff --git a/hack/tools/release/notes/github.go b/hack/tools/release/notes/github.go index 5911eca91829..3c4a8bacf011 100644 --- a/hack/tools/release/notes/github.go +++ b/hack/tools/release/notes/github.go @@ -35,6 +35,18 @@ type githubClient struct { repo string } +// to allow for mocking in tests. +type githubClientInterface interface { + getDiffAllCommits(base, head string) (*githubDiff, error) + getRef(ref string) (githubRef, error) + getTag(tagSHA string) (githubTag, error) + getCommit(sha string) (githubCommit, error) + listMergedPRs(after, before time.Time, baseBranches ...string) ([]githubPR, error) +} + +// Ensure githubClient implements githubClientInterface. +var _ githubClientInterface = (*githubClient)(nil) + // githubDiff is the API response for the "compare" endpoint. type githubDiff struct { // MergeBaseCommit points to most recent common ancestor between two references. diff --git a/hack/tools/release/notes/list.go b/hack/tools/release/notes/list.go index 4cb5bcf1cbf2..4aac94e7634a 100644 --- a/hack/tools/release/notes/list.go +++ b/hack/tools/release/notes/list.go @@ -30,7 +30,7 @@ import ( // githubFromToPRLister lists PRs from GitHub contained between two refs. type githubFromToPRLister struct { - client *githubClient + client githubClientInterface fromRef, toRef ref // branch is optional. It helps optimize the PR query by restricting // the results to PRs merged in the selected branch and in main @@ -46,6 +46,16 @@ func newGithubFromToPRLister(repo string, fromRef, toRef ref, branch string) *gi } } +// for testing purposes. +func newGithubFromToPRListerWithClient(client githubClientInterface, fromRef, toRef ref, branch string) *githubFromToPRLister { + return &githubFromToPRLister{ + client: client, + fromRef: fromRef, + toRef: toRef, + branch: branch, + } +} + // listPRs returns the PRs merged between `fromRef` and `toRef` (included). // It lists all PRs merged in main in the configured branch in the date // range between fromRef and toRef (we include main because minor releases diff --git a/hack/tools/release/notes/list_test.go b/hack/tools/release/notes/list_test.go index c5848e236d9f..fce674adb6d7 100644 --- a/hack/tools/release/notes/list_test.go +++ b/hack/tools/release/notes/list_test.go @@ -20,6 +20,7 @@ limitations under the License. package main import ( + "fmt" "testing" . "github.com/onsi/gomega" @@ -69,26 +70,18 @@ func Test_buildSetOfPRNumbers(t *testing.T) { func Test_githubFromToPRLister_listPRs(t *testing.T) { tests := []struct { name string - fields *githubFromToPRLister + lister *githubFromToPRLister args ref wantErr bool }{ { name: "Successful PR Listing", - fields: &githubFromToPRLister{ - client: &githubClient{ - repo: "kubernetes-sigs/kind", - }, - fromRef: ref{ - reType: "tags", - value: "v0.26.0", - }, - toRef: ref{ - reType: "tags", - value: "v0.27.0", - }, - branch: "main", - }, + lister: newGithubFromToPRListerWithClient( + newMockGithubClient(), + ref{reType: "tags", value: "v0.26.0"}, + ref{reType: "tags", value: "v0.27.0"}, + "main", + ), args: ref{ reType: "tags", value: "v0.26.0", @@ -97,20 +90,12 @@ func Test_githubFromToPRLister_listPRs(t *testing.T) { }, { name: "Setting previousReleaseRef.value blank - should use toRef and fromRef from fields", - fields: &githubFromToPRLister{ - client: &githubClient{ - repo: "kubernetes-sigs/kind", - }, - fromRef: ref{ - reType: "tags", - value: "v0.26.0", - }, - toRef: ref{ - reType: "tags", - value: "v0.27.0", - }, - branch: "main", - }, + lister: newGithubFromToPRListerWithClient( + newMockGithubClient(), + ref{reType: "tags", value: "v0.26.0"}, + ref{reType: "tags", value: "v0.27.0"}, + "main", + ), args: ref{ reType: "tags", value: "", @@ -119,16 +104,12 @@ func Test_githubFromToPRLister_listPRs(t *testing.T) { }, { name: "Create PR List when fromRef is not set", - fields: &githubFromToPRLister{ - client: &githubClient{ - repo: "kubernetes-sigs/kind", - }, - toRef: ref{ - reType: "tags", - value: "v0.27.0", - }, - branch: "main", - }, + lister: newGithubFromToPRListerWithClient( + newMockGithubClient(), + ref{reType: "tags", value: ""}, + ref{reType: "tags", value: "v0.27.0"}, + "main", + ), args: ref{ reType: "tags", value: "v0.26.0", @@ -137,20 +118,12 @@ func Test_githubFromToPRLister_listPRs(t *testing.T) { }, { name: "Fail when previousReleaseRef.value is set to invalid", - fields: &githubFromToPRLister{ - client: &githubClient{ - repo: "kubernetes-sigs/kind", - }, - fromRef: ref{ - reType: "tags", - value: "v0.26.0", - }, - toRef: ref{ - reType: "tags", - value: "v0.27.0", - }, - branch: "main", - }, + lister: newGithubFromToPRListerWithClient( + newMockGithubClientForInvalidRef(), + ref{reType: "tags", value: "v0.26.0"}, + ref{reType: "tags", value: "v0.27.0"}, + "main", + ), args: ref{ reType: "tags", value: "invalid", @@ -159,20 +132,12 @@ func Test_githubFromToPRLister_listPRs(t *testing.T) { }, { name: "Fail when toRef and previousReleaseRef set blank", - fields: &githubFromToPRLister{ - client: &githubClient{ - repo: "kubernetes-sigs/kind", - }, - fromRef: ref{ - reType: "tags", - value: "v0.26.0", - }, - toRef: ref{ - reType: "tags", - value: "", - }, - branch: "main", - }, + lister: newGithubFromToPRListerWithClient( + newMockGithubClientWithError("diff", fmt.Errorf("invalid ref")), + ref{reType: "tags", value: "v0.26.0"}, + ref{reType: "tags", value: ""}, + "main", + ), args: ref{ reType: "tags", value: "", @@ -182,13 +147,7 @@ func Test_githubFromToPRLister_listPRs(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - l := &githubFromToPRLister{ - client: tt.fields.client, - fromRef: tt.fields.fromRef, - toRef: tt.fields.toRef, - branch: tt.fields.branch, - } - _, err := l.listPRs(tt.args) + _, err := tt.lister.listPRs(tt.args) if (err != nil) != tt.wantErr { t.Errorf("githubFromToPRLister.listPRs() error = %v, wantErr %v", err, tt.wantErr) return diff --git a/hack/tools/release/notes/mock_github.go b/hack/tools/release/notes/mock_github.go new file mode 100644 index 000000000000..f734891f1ab4 --- /dev/null +++ b/hack/tools/release/notes/mock_github.go @@ -0,0 +1,158 @@ +//go:build tools +// +build tools + +/* +Copyright 2023 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + +import ( + "fmt" + "time" +) + +// mockGithubClient is a mock implementation of githubClientInterface for testing. +type mockGithubClient struct { + // Mock responses + diffResponse *githubDiff + refResponse githubRef + tagResponse githubTag + commitResponse githubCommit + prsResponse []githubPR + + // Mock errors + diffError error + refError error + tagError error + commitError error + prsError error +} + +// Ensure mockGithubClient implements githubClientInterface. +var _ githubClientInterface = (*mockGithubClient)(nil) + +func (m *mockGithubClient) getDiffAllCommits(_, _ string) (*githubDiff, error) { + if m.diffError != nil { + return nil, m.diffError + } + return m.diffResponse, nil +} + +func (m *mockGithubClient) getRef(_ string) (githubRef, error) { + if m.refError != nil { + return githubRef{}, m.refError + } + return m.refResponse, nil +} + +func (m *mockGithubClient) getTag(_ string) (githubTag, error) { + if m.tagError != nil { + return githubTag{}, m.tagError + } + return m.tagResponse, nil +} + +func (m *mockGithubClient) getCommit(_ string) (githubCommit, error) { + if m.commitError != nil { + return githubCommit{}, m.commitError + } + return m.commitResponse, nil +} + +func (m *mockGithubClient) listMergedPRs(_, _ time.Time, _ ...string) ([]githubPR, error) { + if m.prsError != nil { + return nil, m.prsError + } + return m.prsResponse, nil +} + +// newMockGithubClient creates a new mock client with default responses. +func newMockGithubClient() *mockGithubClient { + return &mockGithubClient{ + diffResponse: &githubDiff{ + MergeBaseCommit: githubCommitNode{ + Commit: githubCommit{ + Message: "Merge commit", + Committer: githubCommitter{ + Date: time.Date(2023, 1, 1, 0, 0, 0, 0, time.UTC), + }, + }, + }, + Commits: []githubCommitNode{ + { + Commit: githubCommit{ + Message: "Merge pull request #1234 from test/branch", + }, + }, + }, + }, + refResponse: githubRef{ + Object: githubObject{ + ObjectType: commitType, + SHA: "abc123", + }, + }, + tagResponse: githubTag{ + Object: githubObject{ + ObjectType: tagType, + SHA: "def456", + }, + }, + commitResponse: githubCommit{ + Message: "Test commit", + Committer: githubCommitter{ + Date: time.Date(2023, 1, 2, 0, 0, 0, 0, time.UTC), + }, + }, + prsResponse: []githubPR{ + { + Number: 1234, + Title: "Test PR", + Labels: []githubLabel{ + {Name: "area/testing"}, + }, + User: githubUser{ + Login: "testuser", + }, + }, + }, + } +} + +// newMockGithubClientWithError creates a mock client that returns an error for specific operations. +func newMockGithubClientWithError(operation string, err error) *mockGithubClient { + mock := newMockGithubClient() + switch operation { + case "diff": + mock.diffError = err + case "ref": + mock.refError = err + case "tag": + mock.tagError = err + case "commit": + mock.commitError = err + case "prs": + mock.prsError = err + } + return mock +} + +// newMockGithubClientForInvalidRef creates a mock client that simulates invalid ref scenarios. +func newMockGithubClientForInvalidRef() *mockGithubClient { + mock := newMockGithubClient() + mock.diffError = fmt.Errorf("invalid ref") + return mock +} From 262bdc18a330ada98824b853920755f86c53ed30 Mon Sep 17 00:00:00 2001 From: ira-pandey1 Date: Mon, 4 Aug 2025 15:46:27 +0530 Subject: [PATCH 4/6] fixing broken test --- hack/tools/release/notes/process.go | 1 + 1 file changed, 1 insertion(+) diff --git a/hack/tools/release/notes/process.go b/hack/tools/release/notes/process.go index 9bcd256bb4d5..9d3787c11668 100644 --- a/hack/tools/release/notes/process.go +++ b/hack/tools/release/notes/process.go @@ -48,6 +48,7 @@ var ( "api": "API", "machinepool": "MachinePool", "clustercachetracker": "ClusterCacheTracker", + "clustercache": "ClusterCacheTracker", "clusterclass": "ClusterClass", "testing": "Testing", "release": "Release", From 4b4459f025ce6a0279dbe804379273ec0170fd6d Mon Sep 17 00:00:00 2001 From: irapandey Date: Thu, 4 Sep 2025 21:37:24 +0530 Subject: [PATCH 5/6] PR Review changes --- .../release/notes/{mock_github.go => github_test.go} | 2 +- hack/tools/release/notes/list.go | 10 ---------- hack/tools/release/notes/list_test.go | 10 ++++++++++ 3 files changed, 11 insertions(+), 11 deletions(-) rename hack/tools/release/notes/{mock_github.go => github_test.go} (98%) diff --git a/hack/tools/release/notes/mock_github.go b/hack/tools/release/notes/github_test.go similarity index 98% rename from hack/tools/release/notes/mock_github.go rename to hack/tools/release/notes/github_test.go index f734891f1ab4..541560da562d 100644 --- a/hack/tools/release/notes/mock_github.go +++ b/hack/tools/release/notes/github_test.go @@ -2,7 +2,7 @@ // +build tools /* -Copyright 2023 The Kubernetes Authors. +Copyright 2025 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/hack/tools/release/notes/list.go b/hack/tools/release/notes/list.go index 4aac94e7634a..03a2932f36b0 100644 --- a/hack/tools/release/notes/list.go +++ b/hack/tools/release/notes/list.go @@ -46,16 +46,6 @@ func newGithubFromToPRLister(repo string, fromRef, toRef ref, branch string) *gi } } -// for testing purposes. -func newGithubFromToPRListerWithClient(client githubClientInterface, fromRef, toRef ref, branch string) *githubFromToPRLister { - return &githubFromToPRLister{ - client: client, - fromRef: fromRef, - toRef: toRef, - branch: branch, - } -} - // listPRs returns the PRs merged between `fromRef` and `toRef` (included). // It lists all PRs merged in main in the configured branch in the date // range between fromRef and toRef (we include main because minor releases diff --git a/hack/tools/release/notes/list_test.go b/hack/tools/release/notes/list_test.go index fce674adb6d7..46b2527df0da 100644 --- a/hack/tools/release/notes/list_test.go +++ b/hack/tools/release/notes/list_test.go @@ -26,6 +26,16 @@ import ( . "github.com/onsi/gomega" ) +// newGithubFromToPRListerWithClient is a helper function for testing purposes. +// It creates a new githubFromToPRLister with the given client, fromRef, toRef and branch. +func newGithubFromToPRListerWithClient(client githubClientInterface, fromRef, toRef ref, branch string) *githubFromToPRLister { + return &githubFromToPRLister{ + client: client, + fromRef: fromRef, + toRef: toRef, + branch: branch, + } +} func Test_buildSetOfPRNumbers(t *testing.T) { tests := []struct { name string From de9972c331c3398bf5e8a0eb53c634ca937fb99d Mon Sep 17 00:00:00 2001 From: irapandey Date: Mon, 13 Oct 2025 17:15:57 +0530 Subject: [PATCH 6/6] PR review changes --- hack/tools/release/notes/list_test.go | 31 ++++++++++++++++++++++++++- hack/tools/release/notes/process.go | 2 +- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/hack/tools/release/notes/list_test.go b/hack/tools/release/notes/list_test.go index 46b2527df0da..e5410e516ae6 100644 --- a/hack/tools/release/notes/list_test.go +++ b/hack/tools/release/notes/list_test.go @@ -82,6 +82,7 @@ func Test_githubFromToPRLister_listPRs(t *testing.T) { name string lister *githubFromToPRLister args ref + want []pr wantErr bool }{ { @@ -96,6 +97,14 @@ func Test_githubFromToPRLister_listPRs(t *testing.T) { reType: "tags", value: "v0.26.0", }, + want: []pr{ + { + number: 1234, + title: "Test PR", + labels: []string{"area/testing"}, + user: "testuser", + }, + }, wantErr: false, }, { @@ -110,6 +119,14 @@ func Test_githubFromToPRLister_listPRs(t *testing.T) { reType: "tags", value: "", }, + want: []pr{ + { + number: 1234, + title: "Test PR", + labels: []string{"area/testing"}, + user: "testuser", + }, + }, wantErr: false, }, { @@ -124,6 +141,14 @@ func Test_githubFromToPRLister_listPRs(t *testing.T) { reType: "tags", value: "v0.26.0", }, + want: []pr{ + { + number: 1234, + title: "Test PR", + labels: []string{"area/testing"}, + user: "testuser", + }, + }, wantErr: false, }, { @@ -138,6 +163,7 @@ func Test_githubFromToPRLister_listPRs(t *testing.T) { reType: "tags", value: "invalid", }, + want: nil, wantErr: true, }, { @@ -152,16 +178,19 @@ func Test_githubFromToPRLister_listPRs(t *testing.T) { reType: "tags", value: "", }, + want: nil, wantErr: true, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - _, err := tt.lister.listPRs(tt.args) + g := NewWithT(t) + got, err := tt.lister.listPRs(tt.args) if (err != nil) != tt.wantErr { t.Errorf("githubFromToPRLister.listPRs() error = %v, wantErr %v", err, tt.wantErr) return } + g.Expect(got).To(Equal(tt.want)) }) } } diff --git a/hack/tools/release/notes/process.go b/hack/tools/release/notes/process.go index 9d3787c11668..d33864ee17b4 100644 --- a/hack/tools/release/notes/process.go +++ b/hack/tools/release/notes/process.go @@ -48,7 +48,7 @@ var ( "api": "API", "machinepool": "MachinePool", "clustercachetracker": "ClusterCacheTracker", - "clustercache": "ClusterCacheTracker", + "clustercache": "ClusterCache", "clusterclass": "ClusterClass", "testing": "Testing", "release": "Release",