summaryrefslogtreecommitdiff
path: root/spec/unit/api_client
diff options
context:
space:
mode:
authordanielsdeleo <dan@opscode.com>2012-12-19 11:39:42 -0800
committerdanielsdeleo <dan@opscode.com>2012-12-19 11:39:42 -0800
commitee34ae4cdfbbd8091932287ac53e90a1acb55ecb (patch)
tree61581bf871df3fcd6a6e78d8a4c596f246c2489e /spec/unit/api_client
parent6bd2a8145a38b452c7b23ead1890cfd80f261af7 (diff)
downloadchef-ee34ae4cdfbbd8091932287ac53e90a1acb55ecb.tar.gz
[CHEF-3689] skip unix-specific permissions test on windows
Diffstat (limited to 'spec/unit/api_client')
-rw-r--r--spec/unit/api_client/registration_spec.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/unit/api_client/registration_spec.rb b/spec/unit/api_client/registration_spec.rb
index 471c7149d7..8e6f9f8483 100644
--- a/spec/unit/api_client/registration_spec.rb
+++ b/spec/unit/api_client/registration_spec.rb
@@ -108,7 +108,10 @@ describe Chef::ApiClient::Registration do
registration.stub!(:private_key).and_return('--begin rsa key etc--')
end
- it "creates the file with 0600 permissions" do
+ # Permission read via File.stat is busted on windows, though creating the
+ # file with 0600 has the desired effect of giving access rights to the
+ # owner only. A platform-specific functional test would be helpful.
+ it "creates the file with 0600 permissions", :unix_only do
File.should_not exist(key_location)
registration.write_key
File.should exist(key_location)