summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Walters <cw@opscode.com>2010-10-28 14:13:37 -0700
committerChris Walters <cw@opscode.com>2010-10-28 14:13:37 -0700
commite21487804e8859710174a7d0c1b1289adf9edffd (patch)
tree367f91d77fcff5d2ccd49ae01206347b18f95849
parent505a75b6808ed1bc723a25ba02fe8ef7411d528e (diff)
downloadchef-e21487804e8859710174a7d0c1b1289adf9edffd.tar.gz
Re-working git feature test to use now test_git_repo
-rw-r--r--features/data/cookbooks/scm/recipes/git.rb2
-rw-r--r--features/provider/scm/git.feature14
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