Exemplo n.º 1
0
									succeeded = false
								})

								It("does not save the input as an implicit output", func() {
									delegate.Finish(logger, finishErr, succeeded, aborted)

									Expect(fakeDB.SaveBuildOutputCallCount()).To(BeZero())
								})
							})
						})
					})

					Context("when the same resource occurs as an explicit output", func() {
						var (
							putPlan atc.PutPlan

							outputDelegate exec.PutDelegate
						)

						BeforeEach(func() {
							putPlan = atc.PutPlan{
								Pipeline: "some-pipeline",
								Resource: "some-input-resource",
								Type:     "some-type",
								Source:   atc.Source{"some": "source"},
								Params:   atc.Params{"some": "output-params"},
							}

							outputDelegate = delegate.OutputDelegate(logger, putPlan, location)
						})
Exemplo n.º 2
0
	. "github.com/onsi/gomega"

	"github.com/concourse/atc"
)

var _ = Describe("Plan", func() {
	Describe("PutPlan", func() {
		It("can convert itself to a GetPlan", func() {
			putPlan := atc.PutPlan{
				Type:     "resource-type",
				Name:     "resource-name",
				Resource: "resource-resource",
				Pipeline: "resource-pipeline",
				Source: atc.Source{
					"resource": "source",
				},
				Params: atc.Params{
					"resource": "params",
				},
				GetParams: atc.Params{
					"resource": "get-params",
				},
				Tags: []string{"tags"},
			}

			getPlan := atc.GetPlan{
				Type:     "resource-type",
				Name:     "resource-name",
				Resource: "resource-resource",
				Pipeline: "resource-pipeline",
				Source: atc.Source{
					"resource": "source",