Beispiel #1
0
				jobName, inputs := fakePipelineDB.GetLatestInputVersionsArgsForCall(0)
				Ω(jobName).Should(Equal(job.Name))
				Ω(inputs).Should(Equal([]atc.JobInput{
					{
						Name:     "some-input",
						Resource: "some-resource",
						Trigger:  true,
					},
					{
						Name:     "some-other-input",
						Resource: "some-other-resource",
						Trigger:  true,
					},
				}))

				Ω(fakePipelineDB.GetJobBuildForInputsCallCount()).Should(Equal(1))

				checkedJob, checkedInputs := fakePipelineDB.GetJobBuildForInputsArgsForCall(0)
				Ω(checkedJob).Should(Equal("some-job"))
				Ω(checkedInputs).Should(ConsistOf(newInputs))
			})

			Context("and the job has inputs configured to not trigger when they change", func() {
				BeforeEach(func() {
					job.InputConfigs = append(job.InputConfigs, atc.JobInputConfig{
						Resource: "some-non-triggering-resource",
						Trigger:  false,
					})

					foundInputsWithCheck := append(
						newInputs,
Beispiel #2
0
				Expect(inputs).To(Equal([]config.JobInput{
					{
						Name:     "some-input",
						Resource: "some-resource",
						Trigger:  true,
						Params:   atc.Params{"some": "params"},
					},
					{
						Name:     "some-other-input",
						Resource: "some-other-resource",
						Trigger:  true,
						Params:   atc.Params{"some": "other-params"},
					},
				}))

				Expect(fakePipelineDB.GetJobBuildForInputsCallCount()).To(Equal(1))

				checkedJob, checkedInputs := fakePipelineDB.GetJobBuildForInputsArgsForCall(0)
				Expect(checkedJob).To(Equal("some-job"))
				Expect(checkedInputs).To(ConsistOf(newInputs))
			})

			Context("and the job has inputs configured to not trigger when they change", func() {
				BeforeEach(func() {
					job.Plan = append(job.Plan, atc.PlanConfig{
						Get:     "some-non-triggering-resource",
						Trigger: false,
					})

					foundInputsWithCheck := append(
						newInputs,