handle := "suitcase" limits := garden.MemoryLimits{ LimitInBytes: 234, } var gotLimits garden.MemoryLimits itRetries(func() error { var err error gotLimits, err = conn.CurrentMemoryLimits(handle) return err }, func(err error) { innerConnection.CurrentMemoryLimitsReturns(limits, err) }, func() int { return innerConnection.CurrentMemoryLimitsCallCount() }, func() { It("calls through to garden", func() { Ω(innerConnection.CurrentMemoryLimitsCallCount()).Should(Equal(1)) calledHandle := innerConnection.CurrentMemoryLimitsArgsForCall(0) Ω(calledHandle).Should(Equal(handle)) }) It("returns the limits", func() { Ω(gotLimits).Should(Equal(limits)) }) }) }) Describe("LimitBandwidth", func() {
handle := "suitcase" limits := garden.MemoryLimits{ LimitInBytes: 234, } var gotLimits garden.MemoryLimits itRetries(func() error { var err error gotLimits, err = conn.CurrentMemoryLimits(handle) return err }, func(err error) { innerConnection.CurrentMemoryLimitsReturns(limits, err) }, func() int { return innerConnection.CurrentMemoryLimitsCallCount() }, func() { It("calls through to garden", func() { Expect(innerConnection.CurrentMemoryLimitsCallCount()).To(Equal(1)) calledHandle := innerConnection.CurrentMemoryLimitsArgsForCall(0) Expect(calledHandle).To(Equal(handle)) }) It("returns the limits", func() { Expect(gotLimits).To(Equal(limits)) }) }) }) Describe("LimitBandwidth", func() {