コード例 #1
0
			desiredLRP         *models.DesiredLRP
			expectedDesiredLRP *models.DesiredLRP

			requestBody interface{}
		)

		BeforeEach(func() {
			desiredLRP = model_helpers.NewValidDesiredLRP("some-guid")

			config, err := json.Marshal(map[string]string{"foo": "bar"})
			Expect(err).NotTo(HaveOccurred())

			desiredLRP.VolumeMounts = []*models.VolumeMount{{
				Driver:             "my-driver",
				ContainerDir:       "/mnt/mypath",
				DeprecatedMode:     models.DeprecatedBindMountMode_RO,
				DeprecatedConfig:   config,
				DeprecatedVolumeId: "my-volume",
			}}

			expectedDesiredLRP = model_helpers.NewValidDesiredLRP("some-guid")

			requestBody = &models.DesireLRPRequest{
				DesiredLrp: desiredLRP,
			}
		})

		JustBeforeEach(func() {
			request := newTestRequest(requestBody)
			handler.DesireDesiredLRP_r1(logger, responseRecorder, request)
		})