Example #1
0
			Context("when exportNetworkEnvVars is set to false", func() {
				BeforeEach(func() {
					exportNetworkEnvVars = false
				})

				It("does not set CF_INSTANCE_IP on the container", func() {
					_, spec, _ := gardenClient.Connection.RunArgsForCall(0)
					Expect(spec.Env).NotTo(ContainElement("CF_INSTANCE_IP=external-ip"))
				})
			})
		})

		Context("when a file descriptor limit is not configured", func() {
			BeforeEach(func() {
				runAction.ResourceLimits = nil
				spawnedProcess.WaitReturns(0, nil)
			})

			It("does not enforce it on the process", func() {
				_, spec, _ := gardenClient.Connection.RunArgsForCall(0)
				Expect(spec.Limits.Nofile).To(BeNil())
			})
		})

		Context("when the script has a non-zero exit code", func() {
			BeforeEach(func() {
				spawnedProcess.WaitReturns(19, nil)
			})

			It("should return an emittable error with the exit code", func() {