def start(self, backend): config = backend.config build_dir = utils.compute_build_dir(config["juju-gui-debug"], config["serve-tests"]) utils.start_haproxy_apache(build_dir, config["serve-tests"], config["ssl-cert-path"], config["secure"])
def test_start_haproxy_apache(self): start_haproxy_apache(JUJU_GUI_DIR, False, self.ssl_cert_path, True) self.assertEqual(self.svc_ctl_call_count, 2) self.assertEqual(self.service_names, ['apache2', 'haproxy']) self.assertEqual( self.actions, [charmhelpers.RESTART, charmhelpers.RESTART])