コード例 #1
0
ファイル: bundle_test.go プロジェクト: cloudfoundry/guardian
		It("returns a bundle with the provided uid mappings added to the runtime spec", func() {
			uidMappings := []specs.LinuxIDMapping{
				{
					HostID:      40000,
					ContainerID: 0,
					Size:        1,
				},
				{
					HostID:      1,
					ContainerID: 1,
					Size:        39999,
				},
			}
			returnedBundle := initialBundle.WithUIDMappings(uidMappings...)

			Expect(returnedBundle.UIDMappings()).To(Equal(uidMappings))
		})
	})

	Describe("WithGIDMappings", func() {
		It("returns a bundle with the provided gid mappings added to the runtime spec", func() {
			gidMappings := []specs.LinuxIDMapping{
				{
					HostID:      40000,
					ContainerID: 0,
					Size:        1,
				},
				{
					HostID:      1,
					ContainerID: 1,
					Size:        39999,