handle := "suitcase" limits := garden.BandwidthLimits{ RateInBytesPerSecond: 234, } var gotLimits garden.BandwidthLimits itRetries(func() error { var err error gotLimits, err = conn.LimitBandwidth(handle, limits) return err }, func(err error) { innerConnection.LimitBandwidthReturns(limits, err) }, func() int { return innerConnection.LimitBandwidthCallCount() }, func() { It("calls through to garden", func() { Ω(innerConnection.LimitBandwidthCallCount()).Should(Equal(1)) calledHandle, calledLimits := innerConnection.LimitBandwidthArgsForCall(0) Ω(calledHandle).Should(Equal(handle)) Ω(calledLimits).Should(Equal(limits)) }) It("returns the limits", func() { Ω(gotLimits).Should(Equal(limits)) }) }) })
handle := "suitcase" limits := garden.BandwidthLimits{ RateInBytesPerSecond: 234, } var gotLimits garden.BandwidthLimits itRetries(func() error { var err error gotLimits, err = conn.LimitBandwidth(handle, limits) return err }, func(err error) { innerConnection.LimitBandwidthReturns(limits, err) }, func() int { return innerConnection.LimitBandwidthCallCount() }, func() { It("calls through to garden", func() { Expect(innerConnection.LimitBandwidthCallCount()).To(Equal(1)) calledHandle, calledLimits := innerConnection.LimitBandwidthArgsForCall(0) Expect(calledHandle).To(Equal(handle)) Expect(calledLimits).To(Equal(limits)) }) It("returns the limits", func() { Expect(gotLimits).To(Equal(limits)) }) }) })