Skip to content

Commit 8b3ece5

Browse files
committed
Linting issues fixed
1 parent a507063 commit 8b3ece5

File tree

1 file changed

+29
-38
lines changed

1 file changed

+29
-38
lines changed

hack/tools/release/notes/list_test.go

+29-38
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,6 @@ func Test_buildSetOfPRNumbers(t *testing.T) {
6767
}
6868

6969
func Test_githubFromToPRLister_listPRs(t *testing.T) {
70-
type fields struct {
71-
client *githubClient
72-
fromRef *ref
73-
toRef *ref
74-
branch string
75-
}
76-
type args struct {
77-
previousReleaseRef ref
78-
}
7970
tests := []struct {
8071
name string
8172
fields *githubFromToPRLister
@@ -85,106 +76,106 @@ func Test_githubFromToPRLister_listPRs(t *testing.T) {
8576
{
8677
name: "Successful PR Listing",
8778
fields: &githubFromToPRLister{
88-
client: &githubClient{
89-
repo: "kubernetes-sigs/kind",
79+
client: &githubClient{
80+
repo: "kubernetes-sigs/kind",
9081
},
9182
fromRef: ref{
9283
reType: "tags",
93-
value: "v0.26.0",
84+
value: "v0.26.0",
9485
},
9586
toRef: ref{
9687
reType: "tags",
97-
value: "v0.27.0",
88+
value: "v0.27.0",
9889
},
99-
branch: "main",
90+
branch: "main",
10091
},
10192
args: ref{
10293
reType: "tags",
103-
value: "v0.26.0",
94+
value: "v0.26.0",
10495
},
10596
wantErr: false,
10697
},
10798
{
10899
name: "Setting previousReleaseRef.value blank - should use toRef and fromRef from fields",
109100
fields: &githubFromToPRLister{
110-
client: &githubClient{
111-
repo: "kubernetes-sigs/kind",
101+
client: &githubClient{
102+
repo: "kubernetes-sigs/kind",
112103
},
113104
fromRef: ref{
114105
reType: "tags",
115-
value: "v0.26.0",
106+
value: "v0.26.0",
116107
},
117108
toRef: ref{
118109
reType: "tags",
119-
value: "v0.27.0",
110+
value: "v0.27.0",
120111
},
121-
branch: "main",
112+
branch: "main",
122113
},
123114
args: ref{
124115
reType: "tags",
125-
value: "",
116+
value: "",
126117
},
127118
wantErr: false,
128119
},
129120
{
130121
name: "Create PR List when fromRef is not set",
131122
fields: &githubFromToPRLister{
132-
client: &githubClient{
133-
repo: "kubernetes-sigs/kind",
123+
client: &githubClient{
124+
repo: "kubernetes-sigs/kind",
134125
},
135126
toRef: ref{
136127
reType: "tags",
137-
value: "v0.27.0",
128+
value: "v0.27.0",
138129
},
139-
branch: "main",
130+
branch: "main",
140131
},
141132
args: ref{
142133
reType: "tags",
143-
value: "v0.26.0",
134+
value: "v0.26.0",
144135
},
145136
wantErr: false,
146137
},
147138
{
148139
name: "Fail when previousReleaseRef.value is set to invalid",
149140
fields: &githubFromToPRLister{
150-
client: &githubClient{
151-
repo: "kubernetes-sigs/kind",
141+
client: &githubClient{
142+
repo: "kubernetes-sigs/kind",
152143
},
153144
fromRef: ref{
154145
reType: "tags",
155-
value: "v0.26.0",
146+
value: "v0.26.0",
156147
},
157148
toRef: ref{
158149
reType: "tags",
159-
value: "v0.27.0",
150+
value: "v0.27.0",
160151
},
161-
branch: "main",
152+
branch: "main",
162153
},
163154
args: ref{
164155
reType: "tags",
165-
value: "invalid",
156+
value: "invalid",
166157
},
167158
wantErr: true,
168159
},
169160
{
170161
name: "Fail when toRef and previousReleaseRef set blank",
171162
fields: &githubFromToPRLister{
172-
client: &githubClient{
173-
repo: "kubernetes-sigs/kind",
163+
client: &githubClient{
164+
repo: "kubernetes-sigs/kind",
174165
},
175166
fromRef: ref{
176167
reType: "tags",
177-
value: "v0.26.0",
168+
value: "v0.26.0",
178169
},
179170
toRef: ref{
180171
reType: "tags",
181-
value: "",
172+
value: "",
182173
},
183-
branch: "main",
174+
branch: "main",
184175
},
185176
args: ref{
186177
reType: "tags",
187-
value: "",
178+
value: "",
188179
},
189180
wantErr: true,
190181
},

0 commit comments

Comments
 (0)