@@ -153,7 +153,7 @@ func createExec(c internalapi.RuntimeService, execReq *runtimeapi.ExecRequest) s
153
153
By ("exec given command in container: " + execReq .ContainerId )
154
154
resp , err := c .Exec (context .TODO (), execReq )
155
155
framework .ExpectNoError (err , "failed to exec in container %q" , execReq .ContainerId )
156
- framework .Logf ("Get exec url : " + resp .Url )
156
+ framework .Logf ("Get exec URL : " + resp .Url )
157
157
return resp .Url
158
158
}
159
159
@@ -184,8 +184,8 @@ func checkExec(c internalapi.RuntimeService, execServerURL, stdout string, stdou
184
184
185
185
// Only http is supported now.
186
186
// TODO: support streaming APIs via tls.
187
- url := parseURL (c , execServerURL )
188
- e , err := remoteclient .NewSPDYExecutor (& rest.Config {TLSClientConfig : rest.TLSClientConfig {Insecure : true }}, "POST" , url )
187
+ parsedURL := parseURL (c , execServerURL )
188
+ e , err := remoteclient .NewSPDYExecutor (& rest.Config {TLSClientConfig : rest.TLSClientConfig {Insecure : true }}, "POST" , parsedURL )
189
189
framework .ExpectNoError (err , "failed to create executor for %q" , execServerURL )
190
190
191
191
streamOptions := remoteclient.StreamOptions {
@@ -210,26 +210,26 @@ func checkExec(c internalapi.RuntimeService, execServerURL, stdout string, stdou
210
210
Expect (localOut .String ()).To (ContainSubstring (stdout ), "The stdout of exec should contain " + stdout )
211
211
}
212
212
Expect (localErr .String ()).To (BeEmpty (), "The stderr of exec should be empty" )
213
- framework .Logf ("Check exec url %q succeed" , execServerURL )
213
+ framework .Logf ("Check exec URL %q succeed" , execServerURL )
214
214
}
215
215
216
216
func parseURL (c internalapi.RuntimeService , serverURL string ) * url.URL {
217
- url , err := url .Parse (serverURL )
218
- framework .ExpectNoError (err , "failed to parse url : %q" , serverURL )
217
+ parsedURL , err := url .Parse (serverURL )
218
+ framework .ExpectNoError (err , "failed to parse URL : %q" , serverURL )
219
219
220
220
version := getVersion (c )
221
221
if version .RuntimeName == "docker" {
222
- if url .Host == "" {
223
- url .Host = defaultStreamServerAddress
222
+ if parsedURL .Host == "" {
223
+ parsedURL .Host = defaultStreamServerAddress
224
224
}
225
- if url .Scheme == "" {
226
- url .Scheme = defaultStreamServerScheme
225
+ if parsedURL .Scheme == "" {
226
+ parsedURL .Scheme = defaultStreamServerScheme
227
227
}
228
228
}
229
229
230
- Expect (url .Host ).NotTo (BeEmpty (), "The host of url should not be empty" )
231
- framework .Logf ("Parse url %q succeed" , serverURL )
232
- return url
230
+ Expect (parsedURL .Host ).NotTo (BeEmpty (), "The host of URL should not be empty" )
231
+ framework .Logf ("Parse URL %q succeed" , serverURL )
232
+ return parsedURL
233
233
}
234
234
235
235
func createDefaultAttach (c internalapi.RuntimeService , containerID string ) string {
@@ -244,7 +244,7 @@ func createDefaultAttach(c internalapi.RuntimeService, containerID string) strin
244
244
245
245
resp , err := c .Attach (context .TODO (), req )
246
246
framework .ExpectNoError (err , "failed to attach in container %q" , containerID )
247
- framework .Logf ("Get attach url : " + resp .Url )
247
+ framework .Logf ("Get attach URL : " + resp .Url )
248
248
return resp .Url
249
249
}
250
250
@@ -295,8 +295,8 @@ func checkAttach(c internalapi.RuntimeService, attachServerURL string) {
295
295
296
296
// Only http is supported now.
297
297
// TODO: support streaming APIs via tls.
298
- url := parseURL (c , attachServerURL )
299
- e , err := remoteclient .NewSPDYExecutor (& rest.Config {TLSClientConfig : rest.TLSClientConfig {Insecure : true }}, "POST" , url )
298
+ parsedURL := parseURL (c , attachServerURL )
299
+ e , err := remoteclient .NewSPDYExecutor (& rest.Config {TLSClientConfig : rest.TLSClientConfig {Insecure : true }}, "POST" , parsedURL )
300
300
framework .ExpectNoError (err , "failed to create executor for %q" , attachServerURL )
301
301
302
302
ctx , cancel := context .WithCancel (context .Background ())
@@ -311,7 +311,7 @@ func checkAttach(c internalapi.RuntimeService, attachServerURL string) {
311
311
framework .ExpectNoError (err , "failed to open streamer for %q" , attachServerURL )
312
312
313
313
Expect (localErr .String ()).To (BeEmpty (), "The stderr of attach should be empty" )
314
- framework .Logf ("Check attach url %q succeed" , attachServerURL )
314
+ framework .Logf ("Check attach URL %q succeed" , attachServerURL )
315
315
}
316
316
317
317
func createDefaultPortForward (c internalapi.RuntimeService , podID string ) string {
@@ -322,7 +322,7 @@ func createDefaultPortForward(c internalapi.RuntimeService, podID string) string
322
322
323
323
resp , err := c .PortForward (context .TODO (), req )
324
324
framework .ExpectNoError (err , "failed to port forward PodSandbox %q" , podID )
325
- framework .Logf ("Get port forward url : " + resp .Url )
325
+ framework .Logf ("Get port forward URL : " + resp .Url )
326
326
return resp .Url
327
327
}
328
328
@@ -333,8 +333,8 @@ func checkPortForward(c internalapi.RuntimeService, portForwardSeverURL string,
333
333
334
334
transport , upgrader , err := spdy .RoundTripperFor (& rest.Config {TLSClientConfig : rest.TLSClientConfig {Insecure : true }})
335
335
framework .ExpectNoError (err , "failed to create spdy round tripper" )
336
- url := parseURL (c , portForwardSeverURL )
337
- dialer := spdy .NewDialer (upgrader , & http.Client {Transport : transport }, "POST" , url )
336
+ parsedURL := parseURL (c , portForwardSeverURL )
337
+ dialer := spdy .NewDialer (upgrader , & http.Client {Transport : transport }, "POST" , parsedURL )
338
338
pf , err := portforward .New (dialer , []string {fmt .Sprintf ("%d:%d" , hostPort , containerPort )}, stopChan , readyChan , os .Stdout , os .Stderr )
339
339
framework .ExpectNoError (err , "failed to create port forward for %q" , portForwardSeverURL )
340
340
@@ -347,5 +347,5 @@ func checkPortForward(c internalapi.RuntimeService, portForwardSeverURL string,
347
347
348
348
By (fmt .Sprintf ("check if we can get nginx main page via localhost:%d" , hostPort ))
349
349
checkMainPage (c , "" , hostPort , 0 )
350
- framework .Logf ("Check port forward url %q succeed" , portForwardSeverURL )
350
+ framework .Logf ("Check port forward URL %q succeed" , portForwardSeverURL )
351
351
}
0 commit comments