本文整理汇总了Golang中github.com/concourse/atc.JobConfig.Serial方法的典型用法代码示例。如果您正苦于以下问题:Golang JobConfig.Serial方法的具体用法?Golang JobConfig.Serial怎么用?Golang JobConfig.Serial使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/concourse/atc.JobConfig
的用法示例。
在下文中一共展示了JobConfig.Serial方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1:
Context("due to an error", func() {
It("logs and returns nil", func() {
Expect(err).To(HaveOccurred())
Expect(reason).To(Equal("failed-to-use-inputs-for-build"))
})
})
})
It("updates max in flight build prep to be blocking", func() {
Expect(fakeDB.UpdateBuildPreparationCallCount()).To(BeNumerically(">=", 6))
Expect(fakeDB.UpdateBuildPreparationArgsForCall(5).MaxRunningBuilds).To(Equal(db.BuildPreparationStatusBlocking))
})
Context("when the job is serial", func() {
BeforeEach(func() {
jobConfig.Serial = true
})
Context("when the call to get running builds throws an error", func() {
BeforeEach(func() {
fakeDB.GetRunningBuildsBySerialGroupReturns([]db.Build{}, errors.New("disaster"))
})
It("returns the error", func() {
Expect(err).To(HaveOccurred())
Expect(reason).To(Equal("db-failed"))
Expect(canBuildBeScheduled).To(BeFalse())
})
})
Context("when another build with the same job is running", func() {