Check error before accessing returned value in e2e/kubectl.go

This avoids test panics.
This commit is contained in:
Yu-Ju Hong 2015-08-10 15:02:17 -07:00
parent f195a80e53
commit 13aec6421a

View File

@ -72,8 +72,8 @@ var _ = Describe("Kubectl client", func() {
c, err = loadClient() c, err = loadClient()
expectNoError(err) expectNoError(err)
testingNs, err = createTestingNS("kubectl", c) testingNs, err = createTestingNS("kubectl", c)
ns = testingNs.Name
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
ns = testingNs.Name
}) })
AfterEach(func() { AfterEach(func() {