Merge "Test canMerge also with checks api"
This commit is contained in:
commit
0a8deaaf7e
|
@ -97,6 +97,21 @@
|
|||
github:
|
||||
check: failure
|
||||
|
||||
- pipeline:
|
||||
name: gate
|
||||
manager: dependent
|
||||
trigger:
|
||||
github:
|
||||
- event: pull_request
|
||||
action: comment
|
||||
comment: merge me
|
||||
success:
|
||||
github:
|
||||
status: success
|
||||
merge: true
|
||||
failure:
|
||||
github: {}
|
||||
|
||||
- job:
|
||||
name: base
|
||||
parent: null
|
||||
|
@ -129,3 +144,6 @@
|
|||
checks-api-reporting:
|
||||
jobs:
|
||||
- project-test1
|
||||
gate:
|
||||
jobs:
|
||||
- project-test1
|
||||
|
|
|
@ -1599,6 +1599,10 @@ class TestGithubAppDriver(ZuulGithubAppTestCase):
|
|||
"""Using the checks API only works with app authentication"""
|
||||
project = "org/project3"
|
||||
github = self.fake_github.getGithubClient(None)
|
||||
repo = github.repo_from_project('org/project3')
|
||||
repo._set_branch_protection(
|
||||
'master', contexts=['tenant-one/checks-api-reporting',
|
||||
'tenant-one/gate'])
|
||||
|
||||
# pipeline reports pull request status both on start and success
|
||||
self.executor_server.hold_jobs_in_build = True
|
||||
|
@ -1642,6 +1646,11 @@ class TestGithubAppDriver(ZuulGithubAppTestCase):
|
|||
)
|
||||
self.assertIsNotNone(check_run["completed_at"])
|
||||
|
||||
# Tell gate to merge to test checks requirements
|
||||
self.fake_github.emitEvent(A.getCommentAddedEvent('merge me'))
|
||||
self.waitUntilSettled()
|
||||
self.assertTrue(A.is_merged)
|
||||
|
||||
@simple_layout("layouts/reporting-github.yaml", driver="github")
|
||||
def test_update_non_existing_check_run(self):
|
||||
project = "org/project3"
|
||||
|
|
Loading…
Reference in New Issue