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

Unified Diff: milo/appengine/buildbot/pubsub_test.go

Issue 2856273004: Milo: Increase test coverage for appengine/buildbot (Closed)
Patch Set: review Created 3 years, 7 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: milo/appengine/buildbot/pubsub_test.go
diff --git a/milo/appengine/buildbot/pubsub_test.go b/milo/appengine/buildbot/pubsub_test.go
index 1d14e8366b8deec56d649427a64b57377356a234..8fd1992a5fcdea6d2a18ea3a7e190d955d2e1d81 100644
--- a/milo/appengine/buildbot/pubsub_test.go
+++ b/milo/appengine/buildbot/pubsub_test.go
@@ -97,6 +97,27 @@ func TestPubSub(t *testing.T) {
rand.Seed(5)
+ Convey("Remove source changes", func() {
+ m := &buildbotMaster{
+ Name: "fake",
+ Builders: map[string]*buildbotBuilder{
+ "fake builder": {
+ PendingBuildStates: []*buildbotPending{
+ {
+ Source: buildbotSourceStamp{
+ Changes: []buildbotChange{{Comments: "foo"}},
+ },
+ },
+ },
+ },
+ },
+ }
+ So(putDSMasterJSON(c, m, false), ShouldBeNil)
+ lm, _, err := getMasterJSON(c, "fake")
+ So(err, ShouldBeNil)
+ So(lm.Builders["fake builder"].PendingBuildStates[0].Source.Changes[0].Comments, ShouldResemble, "")
+ })
+
Convey("Save build entry", func() {
build := &buildbotBuild{
Master: "Fake Master",
« no previous file with comments | « milo/appengine/buildbot/master_test.go ('k') | milo/appengine/buildbot/testdata/chromium_presubmit.426944.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698