Merge branch 'drop-pcre-dependancy'
This commit is contained in:
commit
0e06490ba9
|
@ -10,6 +10,7 @@ omnibus-gitlab repository.
|
|||
- Upgrade Nginx to 1.10.2
|
||||
- Update Redis to 3.2.5 (Takuya Noguchi)
|
||||
- Updarted cacerts.pem to 2016-11-02 version
|
||||
- Stopped using PCRE in the storage directory helper
|
||||
|
||||
8.13.4
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ class StorageDirectoryHelper
|
|||
commands_info << "Failed asserting that ownership of \"#{path}\" was #{expect_string}"
|
||||
|
||||
if @target_mode
|
||||
commands << "[ \"$(stat --printf='%04a' $(readlink -f #{path}) | grep -Po '.{#{@target_mode.length}}$')\" = '#{@target_mode}' ]"
|
||||
commands << "[ \"$(stat --printf='%04a' $(readlink -f #{path}) | grep -o '#{'.' * @target_mode.length}$')\" = '#{@target_mode}' ]"
|
||||
commands_info << "Failed asserting that mode permissions on \"#{path}\" is #{@target_mode}"
|
||||
end
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ describe StorageDirectoryHelper do
|
|||
expect(subject).to receive(:run_command)
|
||||
.with("set -x && [ \"$(stat --printf='%U' $(readlink -f /tmp/validate))\" = 'git' ]", any_args).and_return(success_shell)
|
||||
expect(subject).to receive(:run_command)
|
||||
.with("set -x && [ \"$(stat --printf='%04a' $(readlink -f /tmp/validate) | grep -Po '.{3}$')\" = '700' ]", any_args).and_return(success_shell)
|
||||
.with("set -x && [ \"$(stat --printf='%04a' $(readlink -f /tmp/validate) | grep -o '...$')\" = '700' ]", any_args).and_return(success_shell)
|
||||
expect(subject.validate('/tmp/validate')).to eq(true)
|
||||
end
|
||||
|
||||
|
@ -83,7 +83,7 @@ describe StorageDirectoryHelper do
|
|||
expect(subject).to_not receive(:run_command)
|
||||
.with("set -x && [ \"$(stat --printf='%U:%G' $(readlink -f /tmp/validate))\" = 'git:root' ]", any_args)
|
||||
expect(subject).to_not receive(:run_command)
|
||||
.with("set -x && [ \"$(stat --printf='%04a' $(readlink -f /tmp/validate) | grep -Po '.{3}$')\" = '700' ]", any_args)
|
||||
.with("set -x && [ \"$(stat --printf='%04a' $(readlink -f /tmp/validate) | grep -o '...$')\" = '700' ]", any_args)
|
||||
expect(subject.validate('/tmp/validate')).to eq(false)
|
||||
end
|
||||
|
||||
|
@ -92,7 +92,7 @@ describe StorageDirectoryHelper do
|
|||
expect(subject).to receive(:run_command)
|
||||
.with("set -x && [ \"$(stat --printf='%U' $(readlink -f /tmp/validate))\" = 'git' ]", any_args).and_return(fail_shell)
|
||||
expect(subject).to_not receive(:run_command)
|
||||
.with("set -x && [ \"$(stat --printf='%04a' $(readlink -f /tmp/validate) | grep -Po '.{3}$')\" = '700' ]", any_args)
|
||||
.with("set -x && [ \"$(stat --printf='%04a' $(readlink -f /tmp/validate) | grep -o '...$')\" = '700' ]", any_args)
|
||||
expect(subject.validate('/tmp/validate')).to eq(false)
|
||||
end
|
||||
|
||||
|
@ -101,7 +101,7 @@ describe StorageDirectoryHelper do
|
|||
expect(subject).to receive(:run_command)
|
||||
.with("set -x && [ \"$(stat --printf='%U' $(readlink -f /tmp/validate))\" = 'git' ]", any_args).and_return(success_shell)
|
||||
expect(subject).to receive(:run_command)
|
||||
.with("set -x && [ \"$(stat --printf='%04a' $(readlink -f /tmp/validate) | grep -Po '.{3}$')\" = '700' ]", any_args).and_return(fail_shell)
|
||||
.with("set -x && [ \"$(stat --printf='%04a' $(readlink -f /tmp/validate) | grep -o '...$')\" = '700' ]", any_args).and_return(fail_shell)
|
||||
expect(subject.validate('/tmp/validate')).to eq(false)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue