def test_remove_worker(self): ctx = get_local_context() t.install(ctx) t.start(ctx) t.stop(ctx) t.uninstall(ctx) agent_config = ctx.properties['cloudify_agent'] plugins = _extract_registered_plugins(agent_config['name']) # make sure the worker has stopped self.assertEqual(0, len(plugins)) # make sure files are deleted service_file_path = "/etc/init.d/celeryd-{0}".format( agent_config['name']) defaults_file_path = "/etc/default/celeryd-{0}".format( agent_config['name']) worker_home = agent_config['base_dir'] runner = FabricRunner(ctx, agent_config) self.assertFalse(runner.exists(service_file_path)) self.assertFalse(runner.exists(defaults_file_path)) self.assertFalse(runner.exists(worker_home))
def test_stop_non_existing_worker(self): ctx = get_local_context() t.stop(ctx)
def test_stop_non_existing_worker(self): ctx = get_remote_context() tasks.stop(ctx)