本文整理匯總了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() {