Expect(taskDefinition.CachedDependencies).To(BeEquivalentTo(expectedCacheDependencies)) }) Context("when the droplet uri is missing", func() { BeforeEach(func() { newTaskReq.DropletUri = "" }) It("returns an error", func() { Expect(err).To(Equal(recipebuilder.ErrDropletSourceMissing)) }) }) Context("when the docker path is specified", func() { BeforeEach(func() { newTaskReq.DockerPath = "jim/jim" }) It("returns an error", func() { Expect(err).To(Equal(recipebuilder.ErrMultipleAppSources)) }) }) Context("when the lifecycle does not exist", func() { BeforeEach(func() { newTaskReq.RootFs = "some-other-rootfs" }) It("returns an error", func() { Expect(err).To(Equal(recipebuilder.ErrNoLifecycleDefined)) })
Args: append( []string{"app"}, "docker run fast", "{}", ), Env: taskRequest.EnvironmentVariables, ResourceLimits: &models.ResourceLimits{}, LogSource: "TASK", }) Expect(taskDefinition.Action).To(BeEquivalentTo(expectedAction)) }) Context("when the docker path is not specified", func() { BeforeEach(func() { taskRequest.DockerPath = "" }) It("returns an error", func() { Expect(err).To(Equal(recipebuilder.ErrDockerImageMissing)) }) }) Context("with an invalid docker path url", func() { BeforeEach(func() { taskRequest.DockerPath = "docker://jim/jim" }) It("returns an error", func() { Expect(err).To(HaveOccurred()) })