refactor: replace framework.Failf with e2elog.Failf

This commit is contained in:
SataQiu
2019-06-19 17:52:35 +08:00
parent 9162d932cf
commit 332be4b1e3
144 changed files with 767 additions and 723 deletions

View File

@@ -30,6 +30,7 @@ import (
"k8s.io/apimachinery/pkg/watch"
"k8s.io/client-go/tools/cache"
"k8s.io/kubernetes/test/e2e/framework"
e2elog "k8s.io/kubernetes/test/e2e/framework/log"
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
imageutils "k8s.io/kubernetes/test/utils/image"
@@ -118,7 +119,7 @@ func runDensityBatchTest(f *framework.Framework, testArg densityTest) (time.Dura
}, 10*time.Minute, 10*time.Second).Should(gomega.BeTrue())
if len(watchTimes) < testArg.podsNr {
framework.Failf("Timeout reached waiting for all Pods to be observed by the watch.")
e2elog.Failf("Timeout reached waiting for all Pods to be observed by the watch.")
}
// Analyze results

View File

@@ -24,6 +24,7 @@ import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/kubernetes/test/e2e/framework"
e2elog "k8s.io/kubernetes/test/e2e/framework/log"
imageutils "k8s.io/kubernetes/test/utils/image"
"github.com/onsi/ginkgo"
@@ -98,12 +99,12 @@ var _ = SIGDescribe("[Feature:Windows] [Feature:WindowsGMSA] GMSA [Slow]", func(
}, 1*time.Minute, 1*time.Second).Should(gomega.BeTrue())
if !strings.HasPrefix(output, domain) {
framework.Failf("Expected %q to start with %q", output, domain)
e2elog.Failf("Expected %q to start with %q", output, domain)
}
expectedSubstr := "The command completed successfully"
if !strings.Contains(output, expectedSubstr) {
framework.Failf("Expected %q to contain %q", output, expectedSubstr)
e2elog.Failf("Expected %q to contain %q", output, expectedSubstr)
}
}