From e5189a6dd383863bc616ab0b5faa622974e900ed Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Thu, 9 Mar 2017 14:42:46 -0800 Subject: [PATCH] Retry calls to ReadFileViaContainer in PD tests --- test/e2e/pd.go | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/test/e2e/pd.go b/test/e2e/pd.go index dfabb8393a7..55b9759d951 100644 --- a/test/e2e/pd.go +++ b/test/e2e/pd.go @@ -118,11 +118,7 @@ var _ = framework.KubeDescribe("Pod Disks", func() { framework.ExpectNoError(f.WaitForPodRunningSlow(host1Pod.Name)) - v, err := f.ReadFileViaContainer(host1Pod.Name, containerName, testFile) - framework.ExpectNoError(err) - framework.Logf("Read value: %v", v) - - Expect(strings.TrimSpace(v)).To(Equal(strings.TrimSpace(testFileContents))) + verifyPDContentsViaContainer(f, host1Pod.Name, containerName, map[string]string{testFile: testFileContents}) // Verify that disk is removed from node 1's VolumeInUse list framework.ExpectNoError(waitForPDInVolumesInUse(nodeClient, diskName, host0Name, nodeStatusTimeout, false /* shouldExist */)) @@ -182,11 +178,7 @@ var _ = framework.KubeDescribe("Pod Disks", func() { framework.ExpectNoError(f.WaitForPodRunningSlow(host1Pod.Name)) - v, err := f.ReadFileViaContainer(host1Pod.Name, containerName, testFile) - framework.ExpectNoError(err) - framework.Logf("Read value: %v", v) - - Expect(strings.TrimSpace(v)).To(Equal(strings.TrimSpace(testFileContents))) + verifyPDContentsViaContainer(f, host1Pod.Name, containerName, map[string]string{testFile: testFileContents}) // Verify that disk is removed from node 1's VolumeInUse list framework.ExpectNoError(waitForPDInVolumesInUse(nodeClient, diskName, host0Name, nodeStatusTimeout, false /* shouldExist */))