Skip to content

Commit

Permalink
[PTFE-583] ✨ Prevent creation of integration branches
Browse files Browse the repository at this point in the history
  • Loading branch information
gaspardmoindrot committed Jul 25, 2023
1 parent 5773503 commit 2b9394d
Showing 1 changed file with 1 addition and 28 deletions.
29 changes: 1 addition & 28 deletions bert_e/tests/test_bert_e.py
Original file line number Diff line number Diff line change
Expand Up @@ -1315,35 +1315,8 @@ def test_creation_integration_branch_by_approve(self):
self.assertIn(
'I have successfully merged the changeset', self.get_last_pr_comment(pr))

def test_creation_integration_branch_by_approve_2(self):
"""Test /approve to request integration branches creation.
1. Create a PR and verify that the appropriate message is sent
regarding its creation
2. Ensure that author approval is required for the PR
3. Approve the PR from the author's perspective and check if
the integration branches are created.
4. Once the integration branches are created,
ensure the bot is able to merge the PR.
"""
settings = """
repository_owner: {owner}
repository_slug: {slug}
repository_host: {host}
robot: {robot}
robot_email: [email protected]
pull_request_base_url: https://bitbucket.org/{owner}/{slug}/bar/pull-requests/{{pr_id}}
commit_base_url: https://bitbucket.org/{owner}/{slug}/commits/{{commit_id}}
build_key: pre-merge
required_leader_approvals: 0
required_peer_approvals: 0
always_create_integration_branches: false
admins:
- {admin}
""" # noqa
options = self.bypass_all_but(['bypass_build_status', 'bypass_author_approval'])
pr = self.create_pr('feature/TEST-0069', 'development/4.3')
pr = self.create_pr('feature/TEST-0070', 'development/4.3')

with self.assertRaises(exns.ApprovalRequired):
self.handle(pr.id, options=options, backtrace=True)
Expand Down

0 comments on commit 2b9394d

Please sign in to comment.