Exemple #1
0
			Ω(err).ShouldNot(HaveOccurred())

			Ω(request).Should(MatchJSON(`{
				"params": {"some":"params"},
				"source": {"some":"source"}
			}`))
		})

		It("does not run an additional process", func() {
			Eventually(outProcess.Wait()).Should(Receive(BeNil()))

			Ω(fakeContainer.RunCallCount()).Should(BeZero())
		})

		It("does not stream the artifact source to the versioned source", func() {
			Ω(fakeArtifactSource.StreamToCallCount()).Should(Equal(0))
		})

		Context("when /opt/resource/out prints the version and metadata", func() {
			BeforeEach(func() {
				outScriptStdout = `{
					"version": {"some": "new-version"},
					"metadata": [
						{"name": "a", "value":"a-value"},
						{"name": "b","value": "b-value"}
					]
				}`
			})

			It("returns the version and metadata printed out by /opt/resource/out", func() {
				Eventually(outProcess.Wait()).Should(Receive(BeNil()))
Exemple #2
0
			Expect(request).To(MatchJSON(`{
				"params": {"some":"params"},
				"source": {"some":"source"}
			}`))

		})

		It("does not run an additional process", func() {
			Eventually(outProcess.Wait()).Should(Receive(BeNil()))

			Expect(fakeContainer.RunCallCount()).To(BeZero())
		})

		It("does not stream the artifact source to the versioned source", func() {
			Expect(fakeArtifactSource.StreamToCallCount()).To(Equal(0))
		})

		Context("when /opt/resource/out prints the version and metadata", func() {
			BeforeEach(func() {
				outScriptStdout = `{
					"version": {"some": "new-version"},
					"metadata": [
						{"name": "a", "value":"a-value"},
						{"name": "b","value": "b-value"}
					]
				}`
			})

			It("returns the version and metadata printed out by /opt/resource/out", func() {
				Eventually(outProcess.Wait()).Should(Receive(BeNil()))