mirror of
https://github.com/rpm-software-management/tito.git
synced 2025-02-23 12:12:47 +00:00
tests: adapt test_undo_tag() to the master → main change
This commit is contained in:
parent
6e0f1f12ef
commit
10b315b1a5
1 changed files with 3 additions and 3 deletions
|
@ -94,19 +94,19 @@ class SingleProjectTests(TitoGitTestFixture):
|
||||||
|
|
||||||
def test_undo_tag(self):
|
def test_undo_tag(self):
|
||||||
os.chdir(self.repo_dir)
|
os.chdir(self.repo_dir)
|
||||||
original_head = getoutput('git show-ref -s refs/heads/master')
|
original_head = getoutput('git show-ref -s refs/heads/main')
|
||||||
|
|
||||||
# Create tito tag, which adds a new commit and moves head.
|
# Create tito tag, which adds a new commit and moves head.
|
||||||
tito("tag --accept-auto-changelog --debug")
|
tito("tag --accept-auto-changelog --debug")
|
||||||
tag = "%s-0.0.2-1" % PKG_NAME
|
tag = "%s-0.0.2-1" % PKG_NAME
|
||||||
check_tag_exists(tag, offline=True)
|
check_tag_exists(tag, offline=True)
|
||||||
new_head = getoutput('git show-ref -s refs/heads/master')
|
new_head = getoutput('git show-ref -s refs/heads/main')
|
||||||
self.assertNotEqual(original_head, new_head)
|
self.assertNotEqual(original_head, new_head)
|
||||||
|
|
||||||
# Undo tito tag, which rewinds one commit to original head.
|
# Undo tito tag, which rewinds one commit to original head.
|
||||||
tito("tag -u")
|
tito("tag -u")
|
||||||
self.assertFalse(tag_exists_locally(tag))
|
self.assertFalse(tag_exists_locally(tag))
|
||||||
new_head = getoutput('git show-ref -s refs/heads/master')
|
new_head = getoutput('git show-ref -s refs/heads/main')
|
||||||
self.assertEqual(original_head, new_head)
|
self.assertEqual(original_head, new_head)
|
||||||
|
|
||||||
def test_tag_with_custom_message(self):
|
def test_tag_with_custom_message(self):
|
||||||
|
|
Loading…
Add table
Reference in a new issue