Ejemplo n.º 1
0
// pretendRollLanded changes the roll to appear to have succeeded in the
// mockRietveld.
func (r *mockRietveld) pretendRollLanded(rm *mockRepoManager, issue *rietveld.Issue, tryResults []*buildbucket.Build) {
	// Determine what revision we rolled to.
	m := autoroll.ROLL_REV_REGEX.FindStringSubmatch(issue.Subject)
	assert.NotNil(r.t, m)
	assert.Equal(r.t, 3, len(m))
	rolledTo, err := rm.FullSkiaHash(m[2])
	assert.Nil(r.t, err)
	rm.mockRolledPast(rolledTo, true)
	rm.mockLastRollRev(rolledTo)
	rm.mockForceUpdate()

	issue.Closed = true
	issue.Committed = true
	issue.CommitQueue = false
	issue.CommitQueueDryRun = false
	issue.Description += "\n" + COMMITTED_STR
	r.modify(issue, tryResults)
}