コード例 #1
0
ファイル: test_runner.py プロジェクト: johnclaus/littlechef
 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
ファイル: test_runner.py プロジェクト: johnclaus/littlechef
 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
ファイル: test_runner.py プロジェクト: johnclaus/littlechef
 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'])