From 169ac90fb50e2f579dee01f0d063621dc5574d0e Mon Sep 17 00:00:00 2001 From: Thomas Carmet <8408330+tcarmet@users.noreply.github.com> Date: Fri, 9 Aug 2024 21:00:54 +0000 Subject: [PATCH] PTFE-1927 add full test with lonely stab --- bert_e/tests/test_bert_e.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bert_e/tests/test_bert_e.py b/bert_e/tests/test_bert_e.py index 350d4821..bca5a3d9 100644 --- a/bert_e/tests/test_bert_e.py +++ b/bert_e/tests/test_bert_e.py @@ -4951,6 +4951,18 @@ def test_dev_major_only(self): 'origin/stabilization/4.3.18' ) + def test_dev_major_lonely_stab(self): + """Test Bert-E's handling of a lonely stabilization/x.y.z branch.""" + # create a stabilization 4.5.2 branch from development/4 + self.gitrepo.cmd('git fetch') + self.gitrepo.cmd('git checkout -b stabilization/4.5.2 origin/development/4') + self.gitrepo.cmd('git push -u origin stabilization/4.5.2') + # create a PR from the stabilization branch + pr = self.create_pr('bugfix/TEST-01', 'stabilization/4.5.2') + # expect a DevBranchDoesNotExist exception + with self.assertRaises(exns.DevBranchDoesNotExist): + self.handle(pr.id, options=self.bypass_all, backtrace=True) + class TestQueueing(RepositoryTests): """Tests which validate all things related to the merge queue.