Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: Disable tests that require being non-root #5757

Merged
merged 1 commit into from
Feb 16, 2019

Conversation

sjackman
Copy link
Contributor

@sjackman sjackman commented Feb 16, 2019

Set the environment variable USER=root which is required by
brew tests --only=utils/user

Fix these tests:

rspec ./test/diagnostic_checks_spec.rb:26 # Homebrew::Diagnostic::Checks #check_access_directories
rspec ./test/pathname_spec.rb:120 # Pathname#ensure_writable makes a file writable and restores permissions
rspec ./test/utils/user_spec.rb:22 # User#gui? when the current user is in a console session gui? should equal true
rspec ./test/utils/user_spec.rb:6 # User should eq nil
  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew tests with your changes locally?

@sjackman sjackman requested a review from MikeMcQuaid February 16, 2019 20:18
@sjackman sjackman self-assigned this Feb 16, 2019
@sjackman sjackman added the bug Reproducible Homebrew/brew bug label Feb 16, 2019
@sjackman
Copy link
Contributor Author

I'll merge this PR after CI is 💚. Hopefully that fixes the failed build on Docker Hub.
https://cloud.docker.com/u/linuxbrew/repository/docker/linuxbrew/brew/builds

Set the environment variable USER=root which is required by
brew tests --only=utils/user

Fix these tests:
rspec ./test/diagnostic_checks_spec.rb:26 # Homebrew::Diagnostic::Checks #check_access_directories
rspec ./test/pathname_spec.rb:120 # Pathname#ensure_writable makes a file writable and restores permissions
rspec ./test/utils/user_spec.rb:22 # User#gui? when the current user is in a console session gui? should equal true
rspec ./test/utils/user_spec.rb:6 # User should eq nil
@iMichka iMichka merged commit d273200 into Homebrew:master Feb 16, 2019
@iMichka
Copy link
Member

iMichka commented Feb 16, 2019

Thanks @sjackman

@sjackman sjackman deleted the tests-root branch February 17, 2019 03:40
@sjackman
Copy link
Contributor Author

Thanks for merging, Michka!

@sjackman
Copy link
Contributor Author

Docker Hub build failed with…

==> brew update-test --to-tag
==> FAILED
Start commit: 1facac803ee3e4bfe78adcbff5dcd476abc1f378
End commit: d27320087aa8f8a6653db93ff925e7b9c05bea8d
==> Setup test environment...
Cloning into '.'...
done.
Cloning into bare repository 'remote.git'...
done.
Reset branch 'master'
Your branch is up to date with 'origin/master'.
Everything up-to-date
HEAD is now at 1920eecb7 Merge pull request #5651 from retokromer/patch-1
==> Running brew update...
Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.
Error: Failure while executing; `brew update --verbose` exited with 1.

https://cloud.docker.com/u/linuxbrew/repository/registry-1.docker.io/linuxbrew/brew/builds/af752a01-a332-45f4-acfb-5680d175b592

@lock lock bot added the outdated PR was locked due to age label Mar 19, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/brew bug outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants