Esempio n. 1
0
						"shiny",
					},
				},
				specs.Mount{
					Type:        "banana_fs",
					Source:      "banana_device",
					Destination: "/banana",
					Options: []string{
						"yellow",
						"fresh",
					},
				})
		})

		It("returns a bundle with the mounts added to the spec", func() {
			Expect(returnedBundle.Mounts()).To(ContainElement(
				specs.Mount{
					Destination: "/banana",
					Type:        "banana_fs",
					Source:      "banana_device",
					Options:     []string{"yellow", "fresh"},
				},
			))

			Expect(returnedBundle.Mounts()).To(ContainElement(
				specs.Mount{
					Destination: "/apple",
					Type:        "apple_fs",
					Source:      "iDevice",
					Options:     []string{"healthy", "shiny"},
				}))
Esempio n. 2
0
				{
					SrcPath: "/path/to/ro/src",
					DstPath: "/path/to/ro/dest",
					Mode:    garden.BindMountModeRO,
				},
				{
					SrcPath: "/path/to/rw/src",
					DstPath: "/path/to/rw/dest",
					Mode:    garden.BindMountModeRW,
				},
			},
		})
	})

	It("adds mounts in the bundle spec", func() {
		Expect(newBndl.Mounts()).To(HaveLen(2))

		Expect(newBndl.Mounts()).To(ContainElement(specs.Mount{
			Destination: "/path/to/ro/dest",
			Type:        "bind",
			Source:      "/path/to/ro/src",
			Options:     []string{"bind", "ro"},
		}))

		Expect(newBndl.Mounts()).To(ContainElement(specs.Mount{
			Destination: "/path/to/rw/dest",
			Type:        "bind",
			Source:      "/path/to/rw/src",
			Options:     []string{"bind", "rw"},
		}))
	})