@@ -168,7 +168,7 @@ func Test_templateClient_getGitHubFileContent(t *testing.T) {
168
168
configClient , err := config .New (context .Background (), "" , config .InjectReader (test .NewFakeReader ()))
169
169
g .Expect (err ).ToNot (HaveOccurred ())
170
170
171
- mux .HandleFunc ("/repos/kubernetes-sigs/cluster-api/contents/config/default/cluster-template.yaml" , func (w http.ResponseWriter , r * http.Request ) {
171
+ mux .HandleFunc ("/repos/kubernetes-sigs/cluster-api/contents/config/default/cluster-template.yaml" , func (w http.ResponseWriter , _ * http.Request ) {
172
172
fmt .Fprint (w , `{
173
173
"type": "file",
174
174
"encoding": "base64",
@@ -214,7 +214,7 @@ func Test_templateClient_getGitHubFileContent(t *testing.T) {
214
214
215
215
c := & templateClient {
216
216
configClient : configClient ,
217
- gitHubClientFactory : func (ctx context.Context , configVariablesClient config.VariablesClient ) (* github.Client , error ) {
217
+ gitHubClientFactory : func (context.Context , config.VariablesClient ) (* github.Client , error ) {
218
218
return client , nil
219
219
},
220
220
}
@@ -232,7 +232,7 @@ func Test_templateClient_getGitHubFileContent(t *testing.T) {
232
232
}
233
233
234
234
func Test_templateClient_getRawUrlFileContent (t * testing.T ) {
235
- fakeServer := httptest .NewServer (http .HandlerFunc (func (w http.ResponseWriter , r * http.Request ) {
235
+ fakeServer := httptest .NewServer (http .HandlerFunc (func (w http.ResponseWriter , _ * http.Request ) {
236
236
fmt .Fprint (w , template )
237
237
}))
238
238
@@ -343,7 +343,7 @@ func Test_templateClient_GetFromURL(t *testing.T) {
343
343
fakeGithubClient , mux , teardown := test .NewFakeGitHub ()
344
344
defer teardown ()
345
345
346
- mux .HandleFunc ("/repos/kubernetes-sigs/cluster-api/contents/config/default/cluster-template.yaml" , func (w http.ResponseWriter , r * http.Request ) {
346
+ mux .HandleFunc ("/repos/kubernetes-sigs/cluster-api/contents/config/default/cluster-template.yaml" , func (w http.ResponseWriter , _ * http.Request ) {
347
347
fmt .Fprint (w , `{
348
348
"type": "file",
349
349
"encoding": "base64",
@@ -355,7 +355,7 @@ func Test_templateClient_GetFromURL(t *testing.T) {
355
355
}` )
356
356
})
357
357
358
- mux .HandleFunc ("/repos/some-owner/some-repo/releases/tags/v1.0.0" , func (w http.ResponseWriter , r * http.Request ) {
358
+ mux .HandleFunc ("/repos/some-owner/some-repo/releases/tags/v1.0.0" , func (w http.ResponseWriter , _ * http.Request ) {
359
359
fmt .Fprint (w , `{
360
360
"tag_name": "v1.0.0",
361
361
"name": "v1.0.0",
@@ -370,11 +370,11 @@ func Test_templateClient_GetFromURL(t *testing.T) {
370
370
}` )
371
371
})
372
372
373
- mux .HandleFunc ("/repos/some-owner/some-repo/releases/assets/87654321" , func (w http.ResponseWriter , r * http.Request ) {
373
+ mux .HandleFunc ("/repos/some-owner/some-repo/releases/assets/87654321" , func (w http.ResponseWriter , _ * http.Request ) {
374
374
fmt .Fprint (w , template )
375
375
})
376
376
377
- mux .HandleFunc ("/repos/some-owner/some-repo/releases/tags/v2.0.0" , func (w http.ResponseWriter , r * http.Request ) {
377
+ mux .HandleFunc ("/repos/some-owner/some-repo/releases/tags/v2.0.0" , func (w http.ResponseWriter , _ * http.Request ) {
378
378
fmt .Fprint (w , `{
379
379
"tag_name": "v2.0.0",
380
380
"name": "v2.0.0",
@@ -390,14 +390,14 @@ func Test_templateClient_GetFromURL(t *testing.T) {
390
390
})
391
391
392
392
// redirect asset
393
- mux .HandleFunc ("/repos/some-owner/some-repo/releases/assets/22222222" , func (w http.ResponseWriter , r * http.Request ) {
393
+ mux .HandleFunc ("/repos/some-owner/some-repo/releases/assets/22222222" , func (w http.ResponseWriter , _ * http.Request ) {
394
394
// add the "/api-v3" prefix to match the prefix of the fake github server
395
395
w .Header ().Add ("Location" , "/api-v3/redirected/22222222" )
396
396
w .WriteHeader (http .StatusFound )
397
397
})
398
398
399
399
// redirect location
400
- mux .HandleFunc ("/redirected/22222222" , func (w http.ResponseWriter , r * http.Request ) {
400
+ mux .HandleFunc ("/redirected/22222222" , func (w http.ResponseWriter , _ * http.Request ) {
401
401
fmt .Fprint (w , template )
402
402
})
403
403
@@ -488,7 +488,7 @@ func Test_templateClient_GetFromURL(t *testing.T) {
488
488
489
489
ctx := context .Background ()
490
490
491
- gitHubClientFactory := func (ctx context.Context , configVariablesClient config.VariablesClient ) (* github.Client , error ) {
491
+ gitHubClientFactory := func (context.Context , config.VariablesClient ) (* github.Client , error ) {
492
492
return fakeGithubClient , nil
493
493
}
494
494
processor := yaml .NewSimpleProcessor ()
0 commit comments