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

Unified Diff: tests/gcl_unittest.py

Issue 428001: Avoid losing CL description during Rietveld outage.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 11 years, 1 month 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
« gcl.py ('K') | « gcl.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/gcl_unittest.py
===================================================================
--- tests/gcl_unittest.py (revision 32565)
+++ tests/gcl_unittest.py (working copy)
@@ -160,9 +160,9 @@
self.mox.ReplayAll()
members = [
'CloseIssue', 'Delete', 'GetFiles', 'GetFileNames', 'GetLocalRoot',
- 'Exists', 'Load', 'MissingTests', 'Save', 'UpdateRietveldDescription',
- 'description', 'issue', 'name',
- 'patch', 'patchset',
+ 'Exists', 'Load', 'MissingTests', 'NeedsUpload', 'Save',
+ 'UpdateRietveldDescription', 'description', 'issue', 'name',
+ 'needs_upload', 'patch', 'patchset',
]
# If this test fails, you should add the relevant test.
self.compareMembers(gcl.ChangeInfo('', 0, 0, '', None, self.fake_root_dir),
@@ -187,7 +187,7 @@
gcl.GetChangelistInfoFile('bleh').AndReturn('bleeeh')
gcl.os.path.exists('bleeeh').AndReturn(True)
gcl.ReadFile('bleeeh').AndReturn(
- gcl.ChangeInfo._SEPARATOR.join(["42,53", "G b.cc"] + description))
+ gcl.ChangeInfo._SEPARATOR.join(["42, 53", "G b.cc"] + description))
self.mox.ReplayAll()
change_info = gcl.ChangeInfo.Load('bleh', self.fake_root_dir, True, False)
@@ -214,13 +214,24 @@
def testSaveEmpty(self):
gcl.GetChangelistInfoFile('').AndReturn('foo')
- gcl.WriteFile('foo', gcl.ChangeInfo._SEPARATOR.join(['0, 0', '', '']))
+ gcl.WriteFile('foo', gcl.ChangeInfo._SEPARATOR.join(['0, 0, clean', '',
+ '']))
self.mox.ReplayAll()
change_info = gcl.ChangeInfo('', 0, 0, '', None, self.fake_root_dir)
change_info.Save()
+ def testSaveDirty(self):
+ gcl.GetChangelistInfoFile('').AndReturn('foo')
+ gcl.WriteFile('foo', gcl.ChangeInfo._SEPARATOR.join(['0, 0, dirty', '',
+ '']))
+ self.mox.ReplayAll()
+ change_info = gcl.ChangeInfo('', 0, 0, '', None, self.fake_root_dir,
+ needs_upload=True)
+ change_info.Save()
+
+
class UploadCLUnittest(GclTestsBase):
def setUp(self):
GclTestsBase.setUp(self)
« gcl.py ('K') | « gcl.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698