diff options
author | Zuul <zuul@review.openstack.org> | 2018-01-08 21:35:40 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2018-01-08 21:35:40 +0000 |
commit | cb3fc8dbd98048045833d9fd8402638c3613bc7d (patch) | |
tree | 9db99931d87233517eef4dde86900cf6319c9300 /tests/unit | |
parent | f7f5bf4b1965198f636a010da625c5ef8db86309 (diff) | |
parent | 42f7d6f10084151d8aecb014effdde6eefa6ed8e (diff) | |
download | zuul-cb3fc8dbd98048045833d9fd8402638c3613bc7d.tar.gz |
Merge "Correctly use project name in getGitUrl" into feature/zuulv3
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/test_github_driver.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/unit/test_github_driver.py b/tests/unit/test_github_driver.py index ebb5e1c85..6ab1a2650 100644 --- a/tests/unit/test_github_driver.py +++ b/tests/unit/test_github_driver.py @@ -243,19 +243,28 @@ class TestGithubDriver(ZuulTestCase): @simple_layout('layouts/basic-github.yaml', driver='github') def test_git_https_url(self): """Test that git_ssh option gives git url with ssh""" - url = self.fake_github.real_getGitUrl('org/project') + tenant = self.sched.abide.tenants.get('tenant-one') + _, project = tenant.getProject('org/project') + + url = self.fake_github.real_getGitUrl(project) self.assertEqual('https://github.com/org/project', url) @simple_layout('layouts/basic-github.yaml', driver='github') def test_git_ssh_url(self): """Test that git_ssh option gives git url with ssh""" - url = self.fake_github_ssh.real_getGitUrl('org/project') + tenant = self.sched.abide.tenants.get('tenant-one') + _, project = tenant.getProject('org/project') + + url = self.fake_github_ssh.real_getGitUrl(project) self.assertEqual('ssh://git@github.com/org/project.git', url) @simple_layout('layouts/basic-github.yaml', driver='github') def test_git_enterprise_url(self): """Test that git_url option gives git url with proper host""" - url = self.fake_github_ent.real_getGitUrl('org/project') + tenant = self.sched.abide.tenants.get('tenant-one') + _, project = tenant.getProject('org/project') + + url = self.fake_github_ent.real_getGitUrl(project) self.assertEqual('ssh://git@github.enterprise.io/org/project.git', url) @simple_layout('layouts/reporting-github.yaml', driver='github') |