Merge "web: fix connections list github base_url"
This commit is contained in:
commit
da4d35aaf4
|
@ -1539,3 +1539,26 @@ class TestTenantScopedWebApiWithAuthRules(BaseTestWeb):
|
|||
json=change)
|
||||
self.assertEqual(200, req.status_code, req.text)
|
||||
self.waitUntilSettled()
|
||||
|
||||
|
||||
class TestWebMulti(BaseTestWeb):
|
||||
config_file = 'zuul-gerrit-github.conf'
|
||||
|
||||
def test_web_connections_list_multi(self):
|
||||
data = self.get_url('api/connections').json()
|
||||
gerrit_connection = {
|
||||
'driver': 'gerrit',
|
||||
'name': 'gerrit',
|
||||
'baseurl': 'https://review.example.com',
|
||||
'canonical_hostname': 'review.example.com',
|
||||
'server': 'review.example.com',
|
||||
'port': 29418,
|
||||
}
|
||||
github_connection = {
|
||||
'baseurl': 'https://api.github.com',
|
||||
'canonical_hostname': 'github.com',
|
||||
'driver': 'github',
|
||||
'name': 'github',
|
||||
'server': 'github.com',
|
||||
}
|
||||
self.assertEqual([gerrit_connection, github_connection], data)
|
||||
|
|
|
@ -771,7 +771,7 @@ class GithubConnection(BaseConnection):
|
|||
def toDict(self):
|
||||
d = super().toDict()
|
||||
d.update({
|
||||
"baseurl": self.baseurl,
|
||||
"baseurl": self.base_url,
|
||||
"canonical_hostname": self.canonical_hostname,
|
||||
"server": self.server,
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue