diff options
-rw-r--r-- | features/data/cookbooks/scm/recipes/git.rb | 2 | ||||
-rw-r--r-- | features/provider/scm/git.feature | 14 |
2 files changed, 9 insertions, 7 deletions
diff --git a/features/data/cookbooks/scm/recipes/git.rb b/features/data/cookbooks/scm/recipes/git.rb index 3bbd478193..a36f929e8e 100644 --- a/features/data/cookbooks/scm/recipes/git.rb +++ b/features/data/cookbooks/scm/recipes/git.rb @@ -18,7 +18,7 @@ # # If the features are not being run from a git clone, you're out of luck. git "the chef repo" do - repository "file:///#{File.dirname(__FILE__) + "/../../../../../../../"}" + repository "#{node[:tmpdir]}/test_git_repo" reference "HEAD" destination "#{node[:tmpdir]}/gitchef" action :sync diff --git a/features/provider/scm/git.feature b/features/provider/scm/git.feature index 2b25fca0e6..bd102ebf59 100644 --- a/features/provider/scm/git.feature +++ b/features/provider/scm/git.feature @@ -5,13 +5,15 @@ Feature: Git As a Developer I want to clone and update git repositories +@foo Scenario: Clone a git repo - Given a validated node - And it includes the recipe 'scm::git' - When I run the chef-client - Then the run should exit '0' - And a file named 'gitchef/.git' should exist - And a file named 'gitchef/chef' should exist + Given a test git repo in the temp directory + And a validated node + And it includes the recipe 'scm::git' + When I run the chef-client + Then the run should exit '0' + And a file named 'gitchef/.git' should exist + And a file named 'gitchef/what_revision_am_i' should exist |