def test_nodes_with_role_in_env_not_found(self): """Should abort when no nodes with given recipe found in the environment """ runner.env.chef_environment = "_default" runner.nodes_with_recipe('man')
def test_nodes_with_role_in_env(self): """Should return a filtered list of nodes with recipe when an env is given """ runner.env.chef_environment = "staging" runner.nodes_with_recipe('man') self.assertEqual(runner.env.hosts, ['testnode2'])
def test_nodes_with_role(self): """Should return a list of nodes with the given recipe in the run_list""" runner.nodes_with_recipe('man') self.assertEqual(runner.env.hosts, ['testnode2', 'testnode4'])