Ejemplo n.º 1
0
					_, _, err := provider.Create(
						lagertest.NewTestLogger("test"),
						id,
						&repository_fetcher.Image{
							ImageID: "some-image-id",
						},
						rootfs_provider.Spec{
							Namespaced: false,
							QuotaSize:  quota,
							QuotaScope: garden.DiskLimitScopeExclusive,
						},
					)
					Expect(err).ToNot(HaveOccurred())

					Expect(fakeCake.QuotaedPathCallCount()).To(Equal(1))
					reqId, reqQuota := fakeCake.QuotaedPathArgsForCall(0)
					Expect(reqQuota).To(Equal(quota))
					Expect(reqId).To(Equal(layercake.ContainerID(id)))
				})
			})

			Context("and the scope is total", func() {
				It("should get the quotaed path", func() {
					id := "some-id"
					quota := int64(10 * 1024 * 1024)
					imageSize := int64(5 * 1024 * 1024)

					_, _, err := provider.Create(
						lagertest.NewTestLogger("test"),
						id,