Skip to content

Commit

Permalink
finish it up with all todos
Browse files Browse the repository at this point in the history
  • Loading branch information
tcarmet committed Aug 9, 2024
1 parent 7cd0555 commit d1a3fbc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
11 changes: 11 additions & 0 deletions bert_e/tests/test_bert_e.py
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,17 @@ def test_major_development_branch_no_tag_bump(self):
fixver = ['4.3.19', '4.4.0', '5.1.5', '10.0.0', '10.1.0']
self.finalize_cascade(branches, tags, destination, fixver)

def test_major_dev_branch_lonely_stab(self):
destination = 'stabilization/6.1.5'
branches = OrderedDict({
1: {'name': 'stabilization/6.1.5', 'ignore': False},
2: {'name': 'development/6', 'ignore': False}
})
tags = []
fixver = ['6.1.5', '6.2.0']
with self.assertRaises(exns.DevBranchDoesNotExist):
self.finalize_cascade(branches, tags, destination, fixver)

def test_retry_handler(self):
class DummyError(Exception):
pass
Expand Down
5 changes: 0 additions & 5 deletions bert_e/workflow/gitwaterflow/branches.py
Original file line number Diff line number Diff line change
Expand Up @@ -1031,11 +1031,6 @@ def _set_target_versions(self, dst_branch):
self.target_versions.append('%d.%d.%d' % (
major, minor, dev_branch.micro + offset))
elif dev_branch and dev_branch.has_minor is False:
# TODO: handle case with stab/x.y.z with no dev/x.y
# -> no need as stab/x.y.z cannot exist without a dev/x.y
# TODO: handle case where dev/1 and dev/1.0 exists
# but no 1.0.0 tag
# -> Should return 1.0.0 only
self.target_versions.append(
f"{major}."
f"{dev_branch.latest_minor + 1}."
Expand Down

0 comments on commit d1a3fbc

Please sign in to comment.