deployment.id, 'ok')) as f: return f.read().strip() == 'ok' except IOError, e: if e.errno == errno.ENOENT: return False raise self.assertTrue(_is_riemann_core_up()) deployment_operations_worker_name = deployment.id deployment_workflows_worker_name = '{0}_workflows'\ .format(deployment.id) # have to call this explicitly here to get the latest plugin data _wait_for_stop_dep_env_execution_to_end_if_necessary(deployment.id) data = self.get_plugin_data(plugin_name='agent', deployment_id=deployment.id) # assert both deployment and workflows plugins # were installed, started and restarted # this is because we both install a custom # workflow and a deployment plugin workers_expected_states = \ ['created', 'configured', 'started', 'restarted'] if IS_TRANSIENT_WORKERS_MODE: # workers mode changes during install workflow workers_expected_states.extend(['stopped', 'started', 'stopped']) self.assertEqual(data[deployment_operations_worker_name]['states'], workers_expected_states)
def tearDown(self): utils._wait_for_stop_dep_env_execution_to_end_if_necessary() TestEnvironment.stop_celery_management_worker() TestEnvironment.stop_all_celery_processes() TestEnvironment.reset_elasticsearch_data()
def tearDown(self): utils._wait_for_stop_dep_env_execution_to_end_if_necessary() TestEnvironment.stop_celery_management_worker() TestEnvironment.stop_all_celery_processes() TestEnvironment.reset_elasticsearch_data()
deployment.id, 'ok')) as f: return f.read().strip() == 'ok' except IOError, e: if e.errno == errno.ENOENT: return False raise self.assertTrue(_is_riemann_core_up()) deployment_operations_worker_name = deployment.id deployment_workflows_worker_name = '{0}_workflows'\ .format(deployment.id) # have to call this explicitly here to get the latest plugin data _wait_for_stop_dep_env_execution_to_end_if_necessary(deployment.id) data = self.get_plugin_data(plugin_name='agent', deployment_id=deployment.id) # assert both deployment and workflows plugins # were installed, started and restarted # this is because we both install a custom # workflow and a deployment plugin workers_expected_states = \ ['created', 'configured', 'started', 'restarted'] if IS_TRANSIENT_WORKERS_MODE: # workers mode changes during install workflow workers_expected_states.extend(['stopped', 'started', 'stopped']) self.assertEqual(data[deployment_operations_worker_name]['states'], workers_expected_states)