We no longer need Buffer() on APIServer or Etcd
This commit is contained in:
parent
a6eb5bc2f5
commit
10ba636acd
|
@ -180,8 +180,3 @@ func (s *APIServer) Stop() error {
|
|||
}
|
||||
return s.CertDir.Cleanup()
|
||||
}
|
||||
|
||||
// Buffer implements the gbytes.BufferProvider interface and returns the stdout of the process
|
||||
func (s *APIServer) Buffer() *gbytes.Buffer {
|
||||
return s.session.Buffer()
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@ import (
|
|||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
"github.com/onsi/gomega/gbytes"
|
||||
"github.com/onsi/gomega/gexec"
|
||||
"k8s.io/kubectl/pkg/framework/test/testfakes"
|
||||
)
|
||||
|
@ -56,10 +55,6 @@ var _ = Describe("Apiserver", func() {
|
|||
Describe("starting and stopping the server", func() {
|
||||
Context("when given a path to a binary that runs for a long time", func() {
|
||||
It("can start and stop that binary", func() {
|
||||
sessionBuffer := gbytes.NewBuffer()
|
||||
fmt.Fprint(sessionBuffer, "Everything is fine")
|
||||
fakeSession.BufferReturns(sessionBuffer)
|
||||
|
||||
fakeSession.ExitCodeReturnsOnCall(0, -1)
|
||||
fakeSession.ExitCodeReturnsOnCall(1, 143)
|
||||
|
||||
|
@ -87,8 +82,6 @@ var _ = Describe("Apiserver", func() {
|
|||
By("...getting the URL of Etcd")
|
||||
Expect(fakeEtcdProcess.URLCallCount()).To(Equal(1))
|
||||
|
||||
Eventually(apiServer).Should(gbytes.Say("Everything is fine"))
|
||||
|
||||
By("Stopping the API Server")
|
||||
Expect(apiServer.Stop()).To(Succeed())
|
||||
|
||||
|
|
|
@ -148,8 +148,3 @@ func (e *Etcd) Stop() error {
|
|||
}
|
||||
return e.DataDir.Cleanup()
|
||||
}
|
||||
|
||||
// Buffer implements the gbytes.BufferProvider interface and returns the stdout of the process
|
||||
func (e *Etcd) Buffer() *gbytes.Buffer {
|
||||
return e.session.Buffer()
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@ import (
|
|||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
"github.com/onsi/gomega/gbytes"
|
||||
"github.com/onsi/gomega/gexec"
|
||||
. "k8s.io/kubectl/pkg/framework/test"
|
||||
"k8s.io/kubectl/pkg/framework/test/testfakes"
|
||||
|
@ -50,10 +49,6 @@ var _ = Describe("Etcd", func() {
|
|||
Describe("starting and stopping etcd", func() {
|
||||
Context("when given a path to a binary that runs for a long time", func() {
|
||||
It("can start and stop that binary", func() {
|
||||
sessionBuffer := gbytes.NewBuffer()
|
||||
fmt.Fprintf(sessionBuffer, "Everything is dandy")
|
||||
fakeSession.BufferReturns(sessionBuffer)
|
||||
|
||||
fakeSession.ExitCodeReturnsOnCall(0, -1)
|
||||
fakeSession.ExitCodeReturnsOnCall(1, 143)
|
||||
|
||||
|
@ -72,8 +67,6 @@ var _ = Describe("Etcd", func() {
|
|||
err := etcd.Start()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
Eventually(etcd).Should(gbytes.Say("Everything is dandy"))
|
||||
|
||||
By("Stopping the Etcd Server")
|
||||
Expect(etcd.Stop()).To(Succeed())
|
||||
|
||||
|
|
Loading…
Reference in New Issue