summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorNuo Yan <nuoyan@nuo-yans-macbook-pro.local>2009-04-26 12:04:16 -0700
committerNuo Yan <nuoyan@nuo-yans-macbook-pro.local>2009-04-26 12:04:16 -0700
commit328e083f2710e516d87efb65018d95edbc7c7b13 (patch)
treec337ddcb35ec4be2036a98087cd19357e4c11b19 /features
parent701e2aedc377bde74c6849bd68d953c55431cf92 (diff)
downloadchef-328e083f2710e516d87efb65018d95edbc7c7b13.tar.gz
fixed CHEF-216
Diffstat (limited to 'features')
-rw-r--r--features/execute_commands.feature7
-rw-r--r--features/steps/files.rb7
2 files changed, 14 insertions, 0 deletions
diff --git a/features/execute_commands.feature b/features/execute_commands.feature
index 2034cec79e..ad40767c69 100644
--- a/features/execute_commands.feature
+++ b/features/execute_commands.feature
@@ -9,6 +9,13 @@ Feature: Execute Commands
When I run the chef-client
Then the run should exit '0'
And a file named 'mastodon_rocks' should exist
+
+ Scenario: Execute a command with umask value 777
+ Given a validated node
+ And it includes the recipe 'execute_commands::umask'
+ When I run the chef-client
+ Then the run should exit '0'
+ And '/mastodon_rocks_umask' should exist and raise error when copying
Scenario: Execute a command with more than 4k of output
Given a validated node
diff --git a/features/steps/files.rb b/features/steps/files.rb
index f76852e11e..b21d804136 100644
--- a/features/steps/files.rb
+++ b/features/steps/files.rb
@@ -44,6 +44,13 @@ Then /^a file named '(.+)' should not exist$/ do |filename|
File.exists?(File.join(tmpdir, filename)).should be(false)
end
+#currently using absolute path (specified in recipe execute_commands/recipes/umask.rb)
+Then /^'(.+)' should exist and raise error when copying$/ do |filename|
+ File.exists?(filename).should be(true)
+ lambda{copy(filename, filename + "_copy", false)}.should raise_error()
+end
+
+
Then /^the (.)time of '(.+)' should be different$/ do |time_type, filename|
case time_type
when "m"