handle := "suitcase" limits := garden.BandwidthLimits{ RateInBytesPerSecond: 234, } var gotLimits garden.BandwidthLimits itRetries(func() error { var err error gotLimits, err = conn.CurrentBandwidthLimits(handle) return err }, func(err error) { innerConnection.CurrentBandwidthLimitsReturns(limits, err) }, func() int { return innerConnection.CurrentBandwidthLimitsCallCount() }, func() { It("calls through to garden", func() { Ω(innerConnection.CurrentBandwidthLimitsCallCount()).Should(Equal(1)) calledHandle := innerConnection.CurrentBandwidthLimitsArgsForCall(0) Ω(calledHandle).Should(Equal(handle)) }) It("returns the limits", func() { Ω(gotLimits).Should(Equal(limits)) }) }) }) Describe("CurrentCPULimits", func() {
handle := "suitcase" limits := garden.BandwidthLimits{ RateInBytesPerSecond: 234, } var gotLimits garden.BandwidthLimits itRetries(func() error { var err error gotLimits, err = conn.CurrentBandwidthLimits(handle) return err }, func(err error) { innerConnection.CurrentBandwidthLimitsReturns(limits, err) }, func() int { return innerConnection.CurrentBandwidthLimitsCallCount() }, func() { It("calls through to garden", func() { Expect(innerConnection.CurrentBandwidthLimitsCallCount()).To(Equal(1)) calledHandle := innerConnection.CurrentBandwidthLimitsArgsForCall(0) Expect(calledHandle).To(Equal(handle)) }) It("returns the limits", func() { Expect(gotLimits).To(Equal(limits)) }) }) }) Describe("CurrentCPULimits", func() {