From a6eb5bc2f503e9c061ff4d2f7aa1670d5eca1d50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20H=C3=B6rl?= Date: Mon, 8 Jan 2018 12:11:37 +0000 Subject: [PATCH] We no-longer need Exit() on APIServer or Etcd --- pkg/framework/test/apiserver.go | 5 ----- pkg/framework/test/apiserver_test.go | 5 ----- pkg/framework/test/etcd.go | 5 ----- pkg/framework/test/etcd_test.go | 5 ----- 4 files changed, 20 deletions(-) diff --git a/pkg/framework/test/apiserver.go b/pkg/framework/test/apiserver.go index 35e554d40..adc60061e 100644 --- a/pkg/framework/test/apiserver.go +++ b/pkg/framework/test/apiserver.go @@ -181,11 +181,6 @@ func (s *APIServer) Stop() error { return s.CertDir.Cleanup() } -// ExitCode returns the exit code of the process, if it has exited. If it hasn't exited yet, ExitCode returns -1. -func (s *APIServer) ExitCode() int { - return s.session.ExitCode() -} - // Buffer implements the gbytes.BufferProvider interface and returns the stdout of the process func (s *APIServer) Buffer() *gbytes.Buffer { return s.session.Buffer() diff --git a/pkg/framework/test/apiserver_test.go b/pkg/framework/test/apiserver_test.go index d0cacae38..dc94e663c 100644 --- a/pkg/framework/test/apiserver_test.go +++ b/pkg/framework/test/apiserver_test.go @@ -88,18 +88,13 @@ var _ = Describe("Apiserver", func() { Expect(fakeEtcdProcess.URLCallCount()).To(Equal(1)) Eventually(apiServer).Should(gbytes.Say("Everything is fine")) - Expect(fakeSession.ExitCodeCallCount()).To(Equal(0)) - Expect(apiServer).NotTo(gexec.Exit()) - Expect(fakeSession.ExitCodeCallCount()).To(Equal(1)) By("Stopping the API Server") Expect(apiServer.Stop()).To(Succeed()) Expect(cleanupCallCount).To(Equal(1)) Expect(fakeEtcdProcess.StopCallCount()).To(Equal(1)) - Expect(apiServer).To(gexec.Exit(143)) Expect(fakeSession.TerminateCallCount()).To(Equal(1)) - Expect(fakeSession.ExitCodeCallCount()).To(Equal(2)) }) }) diff --git a/pkg/framework/test/etcd.go b/pkg/framework/test/etcd.go index 05f225c45..86bdd4db6 100644 --- a/pkg/framework/test/etcd.go +++ b/pkg/framework/test/etcd.go @@ -149,11 +149,6 @@ func (e *Etcd) Stop() error { return e.DataDir.Cleanup() } -// ExitCode returns the exit code of the process, if it has exited. If it hasn't exited yet, ExitCode returns -1. -func (e *Etcd) ExitCode() int { - return e.session.ExitCode() -} - // Buffer implements the gbytes.BufferProvider interface and returns the stdout of the process func (e *Etcd) Buffer() *gbytes.Buffer { return e.session.Buffer() diff --git a/pkg/framework/test/etcd_test.go b/pkg/framework/test/etcd_test.go index bbcf8a2c9..ab0512542 100644 --- a/pkg/framework/test/etcd_test.go +++ b/pkg/framework/test/etcd_test.go @@ -73,17 +73,12 @@ var _ = Describe("Etcd", func() { Expect(err).NotTo(HaveOccurred()) Eventually(etcd).Should(gbytes.Say("Everything is dandy")) - Expect(fakeSession.ExitCodeCallCount()).To(Equal(0)) - Expect(etcd).NotTo(gexec.Exit()) - Expect(fakeSession.ExitCodeCallCount()).To(Equal(1)) By("Stopping the Etcd Server") Expect(etcd.Stop()).To(Succeed()) Expect(dataDirCleanupCount).To(Equal(1)) - Expect(etcd).To(gexec.Exit(143)) Expect(fakeSession.TerminateCallCount()).To(Equal(1)) - Expect(fakeSession.ExitCodeCallCount()).To(Equal(2)) }) })