Ejemplo n.º 1
0
							{Name: "resource-1", Type: "some-type"},
							{Name: "resource-2", Type: "some-other-type"},
						},
						ResourceTypes: atc.ResourceTypes{
							{Name: "custom-resource", Type: "custom-type"},
						},
					}, 1, true, nil)
				})

				Context("when triggering the build succeeds", func() {
					BeforeEach(func() {
						fakeScheduler.TriggerImmediatelyReturns(db.Build{
							ID:           42,
							Name:         "1",
							JobName:      "some-job",
							PipelineName: "a-pipeline",
							Status:       db.StatusStarted,
							StartTime:    time.Unix(1, 0),
							EndTime:      time.Unix(100, 0),
						}, nil, nil)
					})

					It("triggers using the current config", func() {
						Expect(fakeScheduler.TriggerImmediatelyCallCount()).To(Equal(1))

						_, job, resources, resourceTypes := fakeScheduler.TriggerImmediatelyArgsForCall(0)
						Expect(job).To(Equal(atc.JobConfig{
							Name: "some-job",
							Plan: atc.PlanSequence{
								{
									Get: "some-input",