diff --git a/features/matchers/path/have_permissions.feature b/features/matchers/path/have_permissions.feature index cb3e9ce6f..b0a9d6e60 100644 --- a/features/matchers/path/have_permissions.feature +++ b/features/matchers/path/have_permissions.feature @@ -31,7 +31,7 @@ Feature: Check if path has permissions in filesystem RSpec.describe 'Check if path has permissions', :type => :aruba do let(:file) { 'file.txt' } - let(:permissions) { 0700 } + let(:permissions) { 0600 } before(:each) { touch(file) } before(:each) { chmod(permissions, file) } @@ -67,7 +67,7 @@ Feature: Check if path has permissions in filesystem RSpec.describe 'Check if path has permissions', :type => :aruba do let(:files) { %w(file1.txt file2.txt) } - let(:permissions) { 0700 } + let(:permissions) { 0600 } before :each do files.each do |f| @@ -89,7 +89,7 @@ Feature: Check if path has permissions in filesystem RSpec.describe 'Check if path has permissions', :type => :aruba do let(:files) { %w(file1.txt file2.txt) } - let(:permissions) { 0700 } + let(:permissions) { 0600 } before :each do touch(files.first) @@ -109,7 +109,7 @@ Feature: Check if path has permissions in filesystem RSpec.describe 'Check if path has permissions', :type => :aruba do let(:path) { 'file.txt' } - let(:permissions) { 0777 } + let(:permissions) { 0700 } it { expect(path).to have_permissions permissions } end diff --git a/spec/aruba/api_spec.rb b/spec/aruba/api_spec.rb index c34f2cabb..e792252e3 100644 --- a/spec/aruba/api_spec.rb +++ b/spec/aruba/api_spec.rb @@ -781,7 +781,7 @@ def actual_permissions let(:file_name) { @file_name } let(:file_path) { @file_path } - let(:permissions) { '0655' } + let(:permissions) { '0644' } before :each do @aruba.set_environment_variable 'HOME', File.expand_path(@aruba.aruba.current_directory) @@ -797,12 +797,12 @@ def actual_permissions context 'when file exists' do context 'and permissions are given as string' do - it { expect(actual_permissions).to eq('0655') } + it { expect(actual_permissions).to eq('0644') } end context 'and permissions are given as octal number' do - let(:permissions) { 0655 } - it { expect(actual_permissions).to eq('0655') } + let(:permissions) { 0644 } + it { expect(actual_permissions).to eq('0644') } end context 'and path has ~ in it' do @@ -810,7 +810,7 @@ def actual_permissions let(:file_name) { File.join('~', path) } let(:file_path) { File.join(@aruba.aruba.current_directory, path) } - it { expect(actual_permissions).to eq('0655') } + it { expect(actual_permissions).to eq('0644') } end end end @@ -819,7 +819,7 @@ def actual_permissions let(:file_name) { @file_name } let(:file_path) { @file_path } - let(:permissions) { '0655' } + let(:permissions) { '0644' } before :each do @aruba.set_environment_variable 'HOME', File.expand_path(@aruba.aruba.current_directory) @@ -868,7 +868,7 @@ def actual_permissions end context 'and fails because the permissions are the same although they should be different' do - let(:different_permissions) { 0655 } + let(:different_permissions) { 0644 } it { expect { @aruba.check_filesystem_permissions(different_permissions, file_name, false) }.to raise_error } end