Merge pull request #5757 from sjackman/tests-root

tests: Disable tests that require being non-root
This commit is contained in:
Michka Popoff 2019-02-16 23:13:43 +01:00 committed by GitHub
commit d27320087a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 1 deletions

View File

@ -1,3 +1,3 @@
sut:
build: .
command: brew test-bot
command: env USER=root brew test-bot

View File

@ -24,6 +24,7 @@ describe Homebrew::Diagnostic::Checks do
end
specify "#check_access_directories" do
skip "User is root so everything is writable." if Process.euid.zero?
begin
dirs = [
HOMEBREW_CACHE,

View File

@ -118,6 +118,7 @@ describe Pathname do
describe "#ensure_writable" do
it "makes a file writable and restores permissions afterwards" do
skip "User is root so everything is writable." if Process.euid.zero?
touch file
chmod 0555, file
expect(file).not_to be_writable