Pass source to project instantiations
So that we can store the canonical hostname. Also use this to
find and store the connection name to keep the initializer signature
small.
Story: 2000953
Change-Id: Ie10f86ff3412016b411bcc511b4d9ad3af163d61
diff --git a/tests/unit/test_gerrit.py b/tests/unit/test_gerrit.py
index 999e55d..a369aff 100644
--- a/tests/unit/test_gerrit.py
+++ b/tests/unit/test_gerrit.py
@@ -22,6 +22,7 @@
import tests.base
from tests.base import BaseTestCase
+from zuul.driver.gerrit import GerritDriver
from zuul.driver.gerrit.gerritconnection import GerritConnection
FIXTURE_DIR = os.path.join(tests.base.FIXTURE_DIR, 'gerrit')
@@ -53,7 +54,8 @@
'user': 'gerrit',
'server': 'localhost',
}
- gerrit = GerritConnection(None, 'review_gerrit', gerrit_config)
+ driver = GerritDriver()
+ gerrit = GerritConnection(driver, 'review_gerrit', gerrit_config)
calls, values = read_fixtures(files)
_ssh_mock.side_effect = values