summaryrefslogtreecommitdiff
path: root/test/git/test_remote.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/git/test_remote.py')
-rw-r--r--test/git/test_remote.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/test/git/test_remote.py b/test/git/test_remote.py
index 638cb103..6870e0e5 100644
--- a/test/git/test_remote.py
+++ b/test/git/test_remote.py
@@ -106,14 +106,22 @@ class TestRemote(TestBase):
# add new tag reference
rtag = TagReference.create(remote_repo, "1.0-RV_hello.there")
res = fetch_and_test(remote, tags=True)
- ltag = res[str(rtag)]
- assert isinstance(ltag.ref, TagReference)
-
- # delete tag
+ tinfo = res[str(rtag)]
+ assert isinstance(tinfo.ref, TagReference) and tinfo.ref.commit == rtag.commit
+ assert tinfo.flags & tinfo.NEW_TAG
# adjust tag commit
+ rtag.object = rhead.commit.parents[0].parents[0]
+ res = fetch_and_test(remote, tags=True)
+ tinfo = res[str(rtag)]
+ assert tinfo.commit == rtag.commit
+ assert tinfo.flags & tinfo.TAG_UPDATE
+
+ # delete remote tag - local one will stay
+ TagReference.delete(remote_repo, rtag)
+ res = fetch_and_test(remote, tags=True)
+ self.failUnlessRaises(IndexError, get_info, res, remote, str(rtag))
- self.fail("tag handling, tag uptodate, new tag, new branch")
def _test_pull(self,remote, rw_repo, remote_repo):
# pull is essentially a fetch + merge, hence we just do a light