示例#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'])