Add ssl support to gearman / gearman_server
Enable SSL support for gearman. We also created an new SSLZuulBaseTest
class to provide a simple way to use SSL end to end where possible. A
future patch will enable support in zookeeper.
Change-Id: Ia8b89bab475d758cc6a021988f8d79ead8836a9d
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
diff --git a/tests/unit/test_scheduler.py b/tests/unit/test_scheduler.py
index 839007d..1124beb 100755
--- a/tests/unit/test_scheduler.py
+++ b/tests/unit/test_scheduler.py
@@ -35,12 +35,36 @@
import zuul.model
from tests.base import (
+ SSLZuulTestCase,
ZuulTestCase,
repack_repo,
simple_layout,
)
+class TestSchedulerSSL(SSLZuulTestCase):
+ tenant_config_file = 'config/single-tenant/main.yaml'
+
+ def test_jobs_executed(self):
+ "Test that jobs are executed and a change is merged"
+
+ A = self.fake_gerrit.addFakeChange('org/project', 'master', 'A')
+ A.addApproval('code-review', 2)
+ self.fake_gerrit.addEvent(A.addApproval('approved', 1))
+ self.waitUntilSettled()
+ self.assertEqual(self.getJobFromHistory('project-merge').result,
+ 'SUCCESS')
+ self.assertEqual(self.getJobFromHistory('project-test1').result,
+ 'SUCCESS')
+ self.assertEqual(self.getJobFromHistory('project-test2').result,
+ 'SUCCESS')
+ self.assertEqual(A.data['status'], 'MERGED')
+ self.assertEqual(A.reported, 2)
+ self.assertEqual(self.getJobFromHistory('project-test1').node,
+ 'label1')
+ self.assertIsNone(self.getJobFromHistory('project-test2').node)
+
+
class TestScheduler(ZuulTestCase):
tenant_config_file = 'config/single-tenant/main.yaml'