Commit cb7586b6 authored by Georges Racinet on's avatar Georges Racinet on
Browse files

Git: testing pipeline jobs

Both SHA and repo_type had to be corrected, being still hardcoded
for Mercurial.
parent 1d1a69899fba
......@@ -132,6 +132,10 @@ def test_mergerequest_api_explicit_merge_message(git_project, tmpdir):
src_branch = prepare_mr_source_branch(repo, with_ci=True)
mr_id = proj.api_create_merge_request(source=src_branch, target='master')
jobs = runner.wait_assert_jobs(2)
assert set(job['git_info']['ref']
for job in jobs) == {'master', 'antelope'}
api_accept_merge_request(proj, mr_id)
repo.git('pull', '--all')
print("Graph after API merge:")
......@@ -151,3 +155,11 @@ def test_mergerequest_api_explicit_merge_message(git_project, tmpdir):
commit_links = proj.webdriver_get_merge_request_commits(mr_id)
assert any(expected in l.text for l in commit_links), (
"Commit summaries don't contain %r" % expected)
# there's a CI job for the target
job = runner.wait_assert_one_job()
vcs_info = job['git_info']
assert vcs_info['ref'] == 'master'
assert vcs_info['repo_type'] == 'git'
assert vcs_info['sha'] == repo.sha('origin/master')
assert vcs_info.get('hgsha') is None
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment