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

Unified Diff: infra/libs/git2/test/ref_test.py

Issue 424423004: Push pending tag and synthesized commit in a single git push operation. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 6 years, 5 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: infra/libs/git2/test/ref_test.py
diff --git a/infra/libs/git2/test/ref_test.py b/infra/libs/git2/test/ref_test.py
index 9e6940eb67a7d23a9d727b3ec29a5400f7ab225e..df06e334b8825e6498105ea155ef3870936562e5 100644
--- a/infra/libs/git2/test/ref_test.py
+++ b/infra/libs/git2/test/ref_test.py
@@ -45,24 +45,9 @@ class TestRef(test_util.TestBasis):
[self.repo[c] for c in 'BCDLMNO']
)
- def testNonFastForward(self):
- r = self.mkRepo()
- O = r['refs/heads/branch_O']
- D = r.get_commit(self.repo['D'])
- with self.assertRaises(git2.CalledProcessError):
- O.fast_forward_push(D)
- self.assertEqual(
- self.repo.git('rev-parse', 'branch_O').stdout.strip(),
- self.repo['O'])
-
- def testFastForward(self):
+ def testUpdateTo(self):
r = self.mkRepo()
O = r['refs/heads/branch_O']
S = r.get_commit(self.repo['S'])
- self.capture_stdio(O.fast_forward_push, S)
+ self.capture_stdio(O.update_to, S)
self.assertEqual(O.commit.hsh, self.repo['S'])
- self.assertEqual(
- self.repo.git('rev-parse', 'branch_O').stdout.strip(),
- self.repo['S'])
-
-

Powered by Google App Engine
This is Rietveld 408576698