mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-20 17:38:50 +00:00
Update port forward e2e for go 1.6
Only close the stdout/stderr pipes from kubectl port-forward when we're truly done with the command, instead of as soon as runPortForward exits. Also try to gracefully stop kubectl port-forward via SIGINT, instead of always sending SIGKILL, as this will help avoid spdy goroutine leaks in the Kubelet.
This commit is contained in:
@@ -511,11 +511,11 @@ var _ = KubeDescribe("Kubectl client", func() {
|
||||
|
||||
It("should support port-forward", func() {
|
||||
By("forwarding the container port to a local port")
|
||||
cmd, listenPort := runPortForward(ns, simplePodName, simplePodPort)
|
||||
defer tryKill(cmd)
|
||||
cmd := runPortForward(ns, simplePodName, simplePodPort)
|
||||
defer cmd.Stop()
|
||||
|
||||
By("curling local port output")
|
||||
localAddr := fmt.Sprintf("http://localhost:%d", listenPort)
|
||||
localAddr := fmt.Sprintf("http://localhost:%d", cmd.port)
|
||||
body, err := curl(localAddr)
|
||||
Logf("got: %s", body)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user