handle := "suitcase" limits := garden.DiskLimits{ ByteHard: 234, } var gotLimits garden.DiskLimits itRetries(func() error { var err error gotLimits, err = conn.CurrentDiskLimits(handle) return err }, func(err error) { innerConnection.CurrentDiskLimitsReturns(limits, err) }, func() int { return innerConnection.CurrentDiskLimitsCallCount() }, func() { It("calls through to garden", func() { Ω(innerConnection.CurrentDiskLimitsCallCount()).Should(Equal(1)) calledHandle := innerConnection.CurrentDiskLimitsArgsForCall(0) Ω(calledHandle).Should(Equal(handle)) }) It("returns the limits", func() { Ω(gotLimits).Should(Equal(limits)) }) }) }) Describe("CurrentMemoryLimits", func() {
handle := "suitcase" limits := garden.DiskLimits{ ByteHard: 234, } var gotLimits garden.DiskLimits itRetries(func() error { var err error gotLimits, err = conn.CurrentDiskLimits(handle) return err }, func(err error) { innerConnection.CurrentDiskLimitsReturns(limits, err) }, func() int { return innerConnection.CurrentDiskLimitsCallCount() }, func() { It("calls through to garden", func() { Expect(innerConnection.CurrentDiskLimitsCallCount()).To(Equal(1)) calledHandle := innerConnection.CurrentDiskLimitsArgsForCall(0) Expect(calledHandle).To(Equal(handle)) }) It("returns the limits", func() { Expect(gotLimits).To(Equal(limits)) }) }) }) Describe("CurrentMemoryLimits", func() {