示例#1
0
	JustBeforeEach(func() {
		for _, image := range persistentImages {
			args = append(args, "--persistent-image", image)
		}
		client = startGarden(args...)

		layersPath = path.Join(client.GraphPath, "aufs", "layers")
		diffPath = path.Join(client.GraphPath, "aufs", "diff")
		mntPath = path.Join(client.GraphPath, "aufs", "mnt")
	})

	AfterEach(func() {
		Expect(os.RemoveAll(nonDefaultRootfsPath)).To(Succeed())
		Expect(client.DestroyAndStop()).To(Succeed())
		client.Cleanup()
	})

	Describe("--graph-cleanup-threshold-in-megabytes", func() {
		JustBeforeEach(func() {
			container, err := client.Create(garden.ContainerSpec{
				RootFSPath: "docker:///busybox",
			})
			Expect(err).ToNot(HaveOccurred())
			Expect(client.Destroy(container.Handle())).To(Succeed())
		})

		Context("when the graph cleanup threshold is set to -1", func() {
			BeforeEach(func() {
				args = []string{"--graph-cleanup-threshold-in-megabytes=-1"}
			})