This commit is contained in:
Mike Danese
2020-01-27 18:19:44 -08:00
parent 59e757afef
commit d55d6175f8
105 changed files with 415 additions and 325 deletions

View File

@@ -19,6 +19,7 @@ limitations under the License.
package network
import (
"context"
"fmt"
"math"
"net/http"
@@ -249,7 +250,7 @@ var _ = SIGDescribe("Proxy", func() {
}
if len(errs) != 0 {
body, err := f.ClientSet.CoreV1().Pods(f.Namespace.Name).GetLogs(pods[0].Name, &v1.PodLogOptions{}).Do().Raw()
body, err := f.ClientSet.CoreV1().Pods(f.Namespace.Name).GetLogs(pods[0].Name, &v1.PodLogOptions{}).Do(context.TODO()).Raw()
if err != nil {
framework.Logf("Error getting logs for pod %s: %v", pods[0].Name, err)
} else {
@@ -270,7 +271,7 @@ func doProxy(f *framework.Framework, path string, i int) (body []byte, statusCod
// chance of the things we are talking to being confused for an error
// that apiserver would have emitted.
start := time.Now()
body, err = f.ClientSet.CoreV1().RESTClient().Get().AbsPath(path).Do().StatusCode(&statusCode).Raw()
body, err = f.ClientSet.CoreV1().RESTClient().Get().AbsPath(path).Do(context.TODO()).StatusCode(&statusCode).Raw()
d = time.Since(start)
if len(body) > 0 {
framework.Logf("(%v) %v: %s (%v; %v)", i, path, truncate(body, maxDisplayBodyLen), statusCode, d)