Beispiel #1
0
				BlockHard:  4,
				InodeLimit: 5,
				Inode:      6,
				InodeSoft:  7,
				InodeHard:  8,
				ByteLimit:  9,
				Byte:       10,
				ByteSoft:   11,
				ByteHard:   12,
			}

			fakeConnection.WhenLimitingDisk = func(handle string, limits warden.DiskLimits) (warden.DiskLimits, error) {
				return limitsToReturn, nil
			}

			limits, err := container.CurrentDiskLimits()
			Ω(err).ShouldNot(HaveOccurred())

			Ω(limits).Should(Equal(limitsToReturn))
		})

		Context("when the request fails", func() {
			disaster := errors.New("oh no!")

			BeforeEach(func() {
				fakeConnection.WhenLimitingDisk = func(handle string, limits warden.DiskLimits) (warden.DiskLimits, error) {
					return warden.DiskLimits{}, disaster
				}
			})

			It("returns the error", func() {