Merge pull request #44761 from wojtek-t/better_logs_in_scale_tests

Automatic merge from submit-queue (batch tested with PRs 42202, 40784, 44642, 44623, 44761)

Remove spammy logs in tests

Ref #44707
This commit is contained in:
Kubernetes Submit Queue 2017-04-21 11:52:11 -07:00 committed by GitHub
commit 7297403c69

View File

@ -570,7 +570,6 @@ func WaitForPodsRunningReady(c clientset.Interface, ns string, minPods, allowedN
desiredPods = len(podList.Items)
for _, pod := range podList.Items {
if len(ignoreLabels) != 0 && ignoreSelector.Matches(labels.Set(pod.Labels)) {
Logf("%v in state %v, ignoring", pod.Name, pod.Status.Phase)
continue
}
res, err := testutils.PodRunningReady(&pod)
@ -627,7 +626,7 @@ func kubectlLogPod(c clientset.Interface, pod v1.Pod, containerNameSubstr string
logFunc("Failed to get logs of pod %v, container %v, err: %v", pod.Name, container.Name, err)
}
}
By(fmt.Sprintf("Logs of %v/%v:%v on node %v", pod.Namespace, pod.Name, container.Name, pod.Spec.NodeName))
logFunc("Logs of %v/%v:%v on node %v", pod.Namespace, pod.Name, container.Name, pod.Spec.NodeName)
logFunc("%s : STARTLOG\n%s\nENDLOG for container %v:%v:%v", containerNameSubstr, logs, pod.Namespace, pod.Name, container.Name)
}
}
@ -1865,7 +1864,7 @@ func ServiceResponding(c clientset.Interface, ns, name string) error {
}
func RestclientConfig(kubeContext string) (*clientcmdapi.Config, error) {
Logf(">>> kubeConfig: %s\n", TestContext.KubeConfig)
Logf(">>> kubeConfig: %s", TestContext.KubeConfig)
if TestContext.KubeConfig == "" {
return nil, fmt.Errorf("KubeConfig must be specified to load client config")
}
@ -1874,7 +1873,7 @@ func RestclientConfig(kubeContext string) (*clientcmdapi.Config, error) {
return nil, fmt.Errorf("error loading KubeConfig: %v", err.Error())
}
if kubeContext != "" {
Logf(">>> kubeContext: %s\n", kubeContext)
Logf(">>> kubeContext: %s", kubeContext)
c.CurrentContext = kubeContext
}
return c, nil