Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Unified Diff: common/api/dm/service/v1/execution_state_evolve_test.go

Issue 1537883002: Initial distributor implementation (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: fix imports and make dummy.go a real file Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « common/api/dm/service/v1/execution_state_evolve.go ('k') | common/api/dm/service/v1/finish_attempt.pb.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/api/dm/service/v1/execution_state_evolve_test.go
diff --git a/common/api/dm/service/v1/execution_state_evolve_test.go b/common/api/dm/service/v1/execution_state_evolve_test.go
index c3a4049c446a82240e3bb59d1e3670192fc8b2b3..3b925dc932975e7d371dad9441a8a1a14270f113 100644
--- a/common/api/dm/service/v1/execution_state_evolve_test.go
+++ b/common/api/dm/service/v1/execution_state_evolve_test.go
@@ -16,32 +16,32 @@ func TestExecutionState(t *testing.T) {
Convey("Evolve", t, func() {
Convey("Identity", func() {
- s := Execution_SCHEDULED
- So(s.Evolve(Execution_SCHEDULED), ShouldBeNil)
- So(s, ShouldEqual, Execution_SCHEDULED)
+ s := Execution_SCHEDULING
+ So(s.Evolve(Execution_SCHEDULING), ShouldBeNil)
+ So(s, ShouldEqual, Execution_SCHEDULING)
})
Convey("Transition", func() {
s := Execution_RUNNING
- So(s.Evolve(Execution_FINISHED), ShouldBeNil)
- So(s, ShouldEqual, Execution_FINISHED)
+ So(s.Evolve(Execution_STOPPING), ShouldBeNil)
+ So(s, ShouldEqual, Execution_STOPPING)
})
Convey("Invalid starting transistion", func() {
s := Execution_FINISHED
- So(s.Evolve(Execution_SCHEDULED), ShouldErrLike, "invalid state transition FINISHED -> SCHEDULE")
+ So(s.Evolve(Execution_SCHEDULING), ShouldErrLike, "invalid state transition FINISHED -> SCHEDULING")
So(s, ShouldEqual, Execution_FINISHED)
})
Convey("Invalid ending transistion", func() {
s := Execution_RUNNING
- So(s.Evolve(Execution_SCHEDULED), ShouldErrLike, "invalid state transition RUNNING -> SCHEDULED")
+ So(s.Evolve(Execution_SCHEDULING), ShouldErrLike, "invalid state transition RUNNING -> SCHEDULING")
So(s, ShouldEqual, Execution_RUNNING)
})
Convey("MustEvolve", func() {
s := Execution_FINISHED
- So(func() { s.MustEvolve(Execution_SCHEDULED) }, ShouldPanic)
+ So(func() { s.MustEvolve(Execution_SCHEDULING) }, ShouldPanic)
})
})
}
« no previous file with comments | « common/api/dm/service/v1/execution_state_evolve.go ('k') | common/api/dm/service/v1/finish_attempt.pb.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698