Exemple #1
0
 def test_nodes_with_role_in_env(self):
     """Should return a filtered list of nodes when an env is given"""
     runner.env.chef_environment = "staging"
     runner.nodes_with_role("all_you_can_eat")
     self.assertEquals(runner.env.hosts, ['testnode2'])
Exemple #2
0
 def test_nodes_with_role_in_env_not_found(self):
     """Should abort when no nodes with given role found in the environment
     """
     runner.env.chef_environment = "production"
     runner.nodes_with_role('base')
Exemple #3
0
 def test_nodes_with_role(self):
     """Should return a list of nodes with the given role in the run_list"""
     runner.nodes_with_role("all_you_can_eat")
     self.assertEquals(runner.env.hosts, ['testnode2'])
Exemple #4
0
 def test_nodes_with_role(self):
     """Should return a list of nodes with the given role in the run_list"""
     runner.nodes_with_role('base')
     self.assertEqual(runner.env.hosts, ['nestedroles1', 'testnode2'])
Exemple #5
0
 def test_nodes_with_role_in_env_not_found(self):
     """Should abort when no nodes with given role found in the environment
     """
     runner.env.chef_environment = "production"
     runner.nodes_with_role('base')
Exemple #6
0
 def test_nodes_with_role_in_env(self):
     """Should return a filtered list of nodes with role when an env is given
     """
     runner.env.chef_environment = "staging"
     runner.nodes_with_role('base')
     self.assertEqual(runner.env.hosts, ['testnode2'])
Exemple #7
0
 def test_nodes_with_role(self):
     """Should return a list of nodes with the given role in the run_list"""
     runner.nodes_with_role('base')
     self.assertEqual(runner.env.hosts, ['nestedroles1', 'testnode2'])
Exemple #8
0
 def test_nodes_with_role(self):
     """Should return a list of nodes with the given role in the run_list"""
     runner.nodes_with_role("all_you_can_eat")
     self.assertEquals(runner.env.hosts, ['testnode2'])