From f2e39e42b84d2ac2f5f19a54ca23af3dc0e98bb7 Mon Sep 17 00:00:00 2001 From: Masaki Kimura Date: Thu, 4 Apr 2019 18:41:22 +0000 Subject: [PATCH] Use framework.ExpectNoError() for test/e2e/storage/persistent_volumes.go --- test/e2e/storage/persistent_volumes.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/e2e/storage/persistent_volumes.go b/test/e2e/storage/persistent_volumes.go index 7eada2b98e2..d3521f09f59 100644 --- a/test/e2e/storage/persistent_volumes.go +++ b/test/e2e/storage/persistent_volumes.go @@ -348,16 +348,16 @@ var _ = utils.SIGDescribe("PersistentVolumes", func() { spec := makeStatefulSetWithPVCs(ns, writeCmd, mounts, claims, probe) ss, err := c.AppsV1().StatefulSets(ns).Create(spec) - Expect(err).NotTo(HaveOccurred()) + framework.ExpectNoError(err) ssTester.WaitForRunningAndReady(1, ss) By("Deleting the StatefulSet but not the volumes") // Scale down to 0 first so that the Delete is quick ss, err = ssTester.Scale(ss, 0) - Expect(err).NotTo(HaveOccurred()) + framework.ExpectNoError(err) ssTester.WaitForStatusReplicas(ss, 0) err = c.AppsV1().StatefulSets(ns).Delete(ss.Name, &metav1.DeleteOptions{}) - Expect(err).NotTo(HaveOccurred()) + framework.ExpectNoError(err) By("Creating a new Statefulset and validating the data") validateCmd := "true" @@ -368,7 +368,7 @@ var _ = utils.SIGDescribe("PersistentVolumes", func() { spec = makeStatefulSetWithPVCs(ns, validateCmd, mounts, claims, probe) ss, err = c.AppsV1().StatefulSets(ns).Create(spec) - Expect(err).NotTo(HaveOccurred()) + framework.ExpectNoError(err) ssTester.WaitForRunningAndReady(1, ss) }) })