예제 #1
0
 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')
예제 #2
0
 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'])
예제 #3
0
 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'])
예제 #4
0
 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')
예제 #5
0
 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'])
예제 #6
0
 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'])