コード例 #1
0
ファイル: build_test.go プロジェクト: utako/atc
		})

		It("returns false if there is a JobName", func() {
			build := db.Build{
				JobName: "something",
			}
			Ω(build.OneOff()).Should(BeFalse())
		})
	})

	Describe("IsRunning", func() {
		It("returns true if the build is pending", func() {
			build := db.Build{
				Status: db.StatusPending,
			}
			Ω(build.Abortable()).Should(BeTrue())
		})

		It("returns true if the build is started", func() {
			build := db.Build{
				Status: db.StatusStarted,
			}
			Ω(build.Abortable()).Should(BeTrue())
		})

		It("returns false if in any other state", func() {
			states := []db.Status{
				db.StatusAborted,
				db.StatusErrored,
				db.StatusFailed,
				db.StatusSucceeded,
コード例 #2
0
ファイル: build_test.go プロジェクト: ACPK/atc
		})

		It("returns false if there is a JobName", func() {
			build := db.Build{
				JobName: "something",
			}
			Expect(build.OneOff()).To(BeFalse())
		})
	})

	Describe("IsRunning", func() {
		It("returns true if the build is pending", func() {
			build := db.Build{
				Status: db.StatusPending,
			}
			Expect(build.Abortable()).To(BeTrue())
		})

		It("returns true if the build is started", func() {
			build := db.Build{
				Status: db.StatusStarted,
			}
			Expect(build.Abortable()).To(BeTrue())
		})

		It("returns false if in any other state", func() {
			states := []db.Status{
				db.StatusAborted,
				db.StatusErrored,
				db.StatusFailed,
				db.StatusSucceeded,