Beispiel #1
0
					VersionedResource: db.VersionedResource{
						Resource: "some-resource", Version: db.Version{"version": "1"},
					},
				},
				{
					Name: "some-other-input",
					VersionedResource: db.VersionedResource{
						Resource: "some-other-resource", Version: db.Version{"version": "2"},
					},
				},
			}

			BeforeEach(func() {
				fakePipelineDB.CreateJobBuildReturns(createdDBBuild, nil)
				fakePipelineDB.GetLatestInputVersionsReturns(pendingInputs, true, nil)
				fakePipelineDB.LoadVersionsDBReturns(someVersions, nil)
			})

			Context("and it can be scheduled", func() {
				BeforeEach(func() {
					fakePipelineDB.ScheduleBuildReturns(true, nil)
				})

				Context("and creating the engine build succeeds", func() {
					var createdBuild *enginefakes.FakeBuild

					BeforeEach(func() {
						createdBuild = new(enginefakes.FakeBuild)
						fakeEngine.CreateBuildReturns(createdBuild, nil)
					})