Permalink
Browse files

Test recipes are found even if not in metadata

The list of recipes included in the metadata is to add optional
descriptions to recipes, not to provide the definitive list.
See http://wiki.opscode.com/display/chef/Metadata#Metadata-recipe
  • Loading branch information...
1 parent 154e7b0 commit 2fb0f8edd4c5d8a5784a3c6672d04df11cd5ba16 David Evans committed Jan 12, 2012
Showing with 6 additions and 1 deletion.
  1. +3 −0 tests/cookbooks/subversion/recipes/testrecipe.rb
  2. +3 −1 tests/test_lib.py
@@ -0,0 +1,3 @@
+# Empty recipe
+# Just here so we can test whether littlechef picks up recipe files
+# which aren't listed explicity in metadata.json
View
@@ -199,14 +199,16 @@ def test_nodes_with_recipe_in_env(self):
def test_list_recipes(self):
recipes = lib.get_recipes()
- self.assertEquals(len(recipes), 5)
+ self.assertEquals(len(recipes), 6)
self.assertEquals(recipes[1]['name'], 'subversion')
self.assertEquals(recipes[1]['description'],
'Includes the client recipe. Modified by site-cookbooks')
self.assertEquals(recipes[2]['name'], 'subversion::client')
self.assertEquals(recipes[2]['description'],
'Subversion Client installs subversion and some extra svn libs')
self.assertEquals(recipes[3]['name'], 'subversion::server')
+ self.assertIn('subversion::testrecipe', [r['name'] for r in recipes])
+
def test_import_plugin(self):

0 comments on commit 2fb0f8e

Please sign in to comment.