summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerdar Sutay <serdar@opscode.com>2014-11-12 15:17:44 -0800
committerSerdar Sutay <serdar@opscode.com>2014-11-12 15:22:41 -0800
commit9d072529e75c86488455996cea00055cd025f160 (patch)
tree3f07e3e7e3e9a38f247296fbb9b0b9225d8d9c99
parent136fe8af2e37d66765412a4fa01067aa10e87f12 (diff)
downloadchef-9d072529e75c86488455996cea00055cd025f160.tar.gz
Fix unit specs on 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 2c7e1a854d..d6230afb6a 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