mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
should be fmt.printf in the e2e test
This commit is contained in:
parent
614e3adda0
commit
a05ede23c1
@ -17,7 +17,7 @@ limitations under the License.
|
|||||||
package framework
|
package framework
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"github.com/golang/glog"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ func WaitForNamedAuthorizationUpdate(c v1beta1authorization.SubjectAccessReviews
|
|||||||
// GKE doesn't enable the SAR endpoint. Without this endpoint, we cannot determine if the policy engine
|
// GKE doesn't enable the SAR endpoint. Without this endpoint, we cannot determine if the policy engine
|
||||||
// has adjusted as expected. In this case, simply wait one second and hope it's up to date
|
// has adjusted as expected. In this case, simply wait one second and hope it's up to date
|
||||||
if apierrors.IsNotFound(err) {
|
if apierrors.IsNotFound(err) {
|
||||||
fmt.Printf("SubjectAccessReview endpoint is missing\n")
|
glog.Info("SubjectAccessReview endpoint is missing")
|
||||||
time.Sleep(1 * time.Second)
|
time.Sleep(1 * time.Second)
|
||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
@ -94,7 +94,7 @@ func BindClusterRole(c v1beta1rbac.ClusterRoleBindingsGetter, clusterRole, ns st
|
|||||||
|
|
||||||
// if we failed, don't fail the entire test because it may still work. RBAC may simply be disabled.
|
// if we failed, don't fail the entire test because it may still work. RBAC may simply be disabled.
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("Error binding clusterrole/%s for %q for %v\n", clusterRole, ns, subjects)
|
glog.Errorf("Error binding clusterrole/%s for %q for %v\n", clusterRole, ns, subjects)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,7 +124,7 @@ func bindInNamespace(c v1beta1rbac.RoleBindingsGetter, roleType, role, ns string
|
|||||||
|
|
||||||
// if we failed, don't fail the entire test because it may still work. RBAC may simply be disabled.
|
// if we failed, don't fail the entire test because it may still work. RBAC may simply be disabled.
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("Error binding %s/%s into %q for %v\n", roleType, role, ns, subjects)
|
glog.Errorf("Error binding %s/%s into %q for %v\n", roleType, role, ns, subjects)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -238,7 +238,7 @@ func fetchPrometheusTargetDiscovery(c clientset.Interface) (TargetDiscovery, err
|
|||||||
Raw()
|
Raw()
|
||||||
var qres promTargetsResponse
|
var qres promTargetsResponse
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf(string(response))
|
framework.Logf(string(response))
|
||||||
return qres.Data, err
|
return qres.Data, err
|
||||||
}
|
}
|
||||||
err = json.Unmarshal(response, &qres)
|
err = json.Unmarshal(response, &qres)
|
||||||
@ -297,7 +297,7 @@ func queryPrometheus(c clientset.Interface, query string, start, end time.Time,
|
|||||||
Do().
|
Do().
|
||||||
Raw()
|
Raw()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf(string(response))
|
framework.Logf(string(response))
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
var qres promQueryResponse
|
var qres promQueryResponse
|
||||||
|
@ -17,7 +17,6 @@ limitations under the License.
|
|||||||
package node
|
package node
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -84,7 +83,7 @@ var _ = SIGDescribe("Events", func() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
framework.Failf("Failed to get pod: %v", err)
|
framework.Failf("Failed to get pod: %v", err)
|
||||||
}
|
}
|
||||||
fmt.Printf("%+v\n", podWithUid)
|
framework.Logf("%+v\n", podWithUid)
|
||||||
var events *v1.EventList
|
var events *v1.EventList
|
||||||
// Check for scheduler event about the pod.
|
// Check for scheduler event about the pod.
|
||||||
By("checking for scheduler event about the pod")
|
By("checking for scheduler event about the pod")
|
||||||
@ -101,7 +100,7 @@ var _ = SIGDescribe("Events", func() {
|
|||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
if len(events.Items) > 0 {
|
if len(events.Items) > 0 {
|
||||||
fmt.Println("Saw scheduler event for our pod.")
|
framework.Logf("Saw scheduler event for our pod.")
|
||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
return false, nil
|
return false, nil
|
||||||
@ -121,7 +120,7 @@ var _ = SIGDescribe("Events", func() {
|
|||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
if len(events.Items) > 0 {
|
if len(events.Items) > 0 {
|
||||||
fmt.Println("Saw kubelet event for our pod.")
|
framework.Logf("Saw kubelet event for our pod.")
|
||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
return false, nil
|
return false, nil
|
||||||
|
Loading…
Reference in New Issue
Block a user