summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerdar Sutay <serdar@opscode.com>2014-11-12 19:52:47 -0800
committerSerdar Sutay <serdar@opscode.com>2014-11-12 19:52:47 -0800
commit52d7de56fe96440569f56b670d6ec578e3399160 (patch)
tree383e4f5ff2715b77252a74996e476e83a384eba8
parentf516efc9af6dc046dbb4d6eba1d6cf63fdc5f872 (diff)
parent64fa9003c462094fce105ca62a814c57c8dac280 (diff)
downloadchef-52d7de56fe96440569f56b670d6ec578e3399160.tar.gz
Merge pull request #2410 from opscode/sersut/port-sparc-fix
Merge pull request #2407 from opscode/sersut/ci-fix-sparc
-rw-r--r--spec/unit/api_client/registration_spec.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/unit/api_client/registration_spec.rb b/spec/unit/api_client/registration_spec.rb
index 5812eb2fb5..455e2d846b 100644
--- a/spec/unit/api_client/registration_spec.rb
+++ b/spec/unit/api_client/registration_spec.rb
@@ -212,7 +212,13 @@ describe Chef::ApiClient::Registration do
context 'when the client key location is a symlink' do
it 'does not follow the symlink', :unix_only do
- expect(registration.file_flags).to eq(File::CREAT|File::TRUNC|File::RDWR|File::NOFOLLOW)
+ expected_flags = (File::CREAT|File::TRUNC|File::RDWR)
+
+ if defined?(File::NOFOLLOW)
+ expected_flags |= File::NOFOLLOW
+ end
+
+ expect(registration.file_flags).to eq(expected_flags)
end
context 'with follow_client_key_symlink set to true' do