Skip to content

Commit 0fd18fc

Browse files
committed
Updating log after framework code refactor
1 parent 9e0a1d2 commit 0fd18fc

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/e2e/windows/dns.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ import (
2323
v1 "k8s.io/api/core/v1"
2424
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2525
"k8s.io/kubernetes/test/e2e/framework"
26+
e2elog "k8s.io/kubernetes/test/e2e/framework/log"
2627
imageutils "k8s.io/kubernetes/test/utils/image"
2728

2829
"github.com/onsi/ginkgo"
29-
"github.com/onsi/gomega"
3030
)
3131

3232
const dnsTestPodHostName = "dns-querier-1"
@@ -54,14 +54,14 @@ var _ = SIGDescribe("DNS", func() {
5454
}
5555
testUtilsPod, err := f.ClientSet.CoreV1().Pods(f.Namespace.Name).Create(testUtilsPod)
5656
framework.ExpectNoError(err)
57-
framework.Logf("Created pod %v", testUtilsPod)
57+
e2elog.Logf("Created pod %v", testUtilsPod)
5858
defer func() {
59-
framework.Logf("Deleting pod %s...", testUtilsPod.Name)
59+
e2elog.Logf("Deleting pod %s...", testUtilsPod.Name)
6060
if err := f.ClientSet.CoreV1().Pods(f.Namespace.Name).Delete(testUtilsPod.Name, metav1.NewDeleteOptions(0)); err != nil {
61-
framework.Failf("Failed to delete pod %s: %v", testUtilsPod.Name, err)
61+
e2elog.Failf("Failed to delete pod %s: %v", testUtilsPod.Name, err)
6262
}
6363
}()
64-
gomega.Expect(f.WaitForPodRunning(testUtilsPod.Name)).NotTo(gomega.HaveOccurred(), "failed to wait for pod %s to be running", testUtilsPod.Name)
64+
framework.ExpectNoError(f.WaitForPodRunning(testUtilsPod.Name), "failed to wait for pod %s to be running", testUtilsPod.Name)
6565

6666
ginkgo.By("Verifying customized DNS option is configured on pod...")
6767
cmd := []string{"ipconfig", "/all"}
@@ -75,17 +75,17 @@ var _ = SIGDescribe("DNS", func() {
7575
})
7676
framework.ExpectNoError(err)
7777

78-
framework.Logf("ipconfig /all:\n%s", stdout)
78+
e2elog.Logf("ipconfig /all:\n%s", stdout)
7979
dnsRegex, err := regexp.Compile(`DNS Servers[\s*.]*:(\s*[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})+`)
8080

8181
if dnsRegex.MatchString(stdout) {
8282
match := dnsRegex.FindString(stdout)
8383

8484
if !strings.Contains(match, testInjectedIP) {
85-
framework.Failf("customized DNS options not found in ipconfig /all, got: %s", match)
85+
e2elog.Failf("customized DNS options not found in ipconfig /all, got: %s", match)
8686
}
8787
} else {
88-
framework.Failf("cannot find DNS server info in ipconfig /all output: \n%s", stdout)
88+
e2elog.Failf("cannot find DNS server info in ipconfig /all output: \n%s", stdout)
8989
}
9090
// TODO: Add more test cases for other DNSPolicies.
9191
})

0 commit comments

Comments
 (0)