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

Unified Diff: scheduler/appengine/engine/engine_test.go

Issue 2998623002: scheduler ACLs: fix ACLs saving upon job config change. (Closed)
Patch Set: fix import order Created 3 years, 4 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
Index: scheduler/appengine/engine/engine_test.go
diff --git a/scheduler/appengine/engine/engine_test.go b/scheduler/appengine/engine/engine_test.go
index 98369229e3ce2f66e316c98ea125dc66e5d8608e..41b554a58adf2eaba0ef1c2b4c6d96f90a90bdde 100644
--- a/scheduler/appengine/engine/engine_test.go
+++ b/scheduler/appengine/engine/engine_test.go
@@ -104,6 +104,32 @@ func TestUpdateProjectJobs(t *testing.T) {
},
},
})
+
+ // TODO(tandrii): delete and update above definition after no-ACL -> ACL transition.
+ // Simulate ACL version roll without change of project config.
+ So(e.UpdateProjectJobs(c, "abc", []catalog.Definition{
+ {
+ JobID: "abc/1",
+ Revision: "rev1",
+ Schedule: "*/5 * * * * * *",
+ Acls: acl.GrantsByRole{Readers: []string{"group:r"}, Owners: []string{"groups:o"}},
+ }}), ShouldBeNil)
+ So(allJobs(c), ShouldResemble, []Job{
+ {
+ JobID: "abc/1",
+ ProjectID: "abc",
+ Revision: "rev1",
+ Enabled: true,
+ Acls: acl.GrantsByRole{Readers: []string{"group:r"}, Owners: []string{"groups:o"}},
+ Schedule: "*/5 * * * * * *",
+ State: JobState{
+ State: "SCHEDULED",
+ TickNonce: 6278013164014963328,
+ TickTime: epoch.Add(5 * time.Second),
+ },
+ },
+ })
+
// Enqueued timer task to launch it.
task := ensureOneTask(c, "timers-q")
So(task.Path, ShouldEqual, "/timers")
« scheduler/appengine/engine/engine.go ('K') | « scheduler/appengine/engine/engine.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698