Merge pull request #8679 from MikeMcQuaid/tests-tweaks
Tweak tests annotations
This commit is contained in:
commit
5875f74c4d
8
.github/workflows/tests.yml
vendored
8
.github/workflows/tests.yml
vendored
@ -60,6 +60,14 @@ jobs:
|
||||
- name: Run brew man
|
||||
run: brew man --fail-if-changed
|
||||
|
||||
- name: Install brew tests dependencies
|
||||
if: matrix.os == 'macOS-latest'
|
||||
run: |
|
||||
brew install subversion
|
||||
Library/Homebrew/shims/scm/svn --homebrew=print-path
|
||||
which svn
|
||||
which svnadmin
|
||||
|
||||
- name: Run brew tests
|
||||
run: |
|
||||
# brew tests doesn't like world writable directories
|
||||
|
||||
@ -125,17 +125,23 @@ RSpec.configure do |config|
|
||||
end
|
||||
|
||||
config.before(:each, :needs_svn) do
|
||||
skip "Subversion is not installed." unless quiet_system "#{HOMEBREW_SHIMS_PATH}/scm/svn", "--version"
|
||||
svn_shim = HOMEBREW_SHIMS_PATH/"scm/svn"
|
||||
skip "Subversion is not installed." unless quiet_system svn_shim, "--version"
|
||||
|
||||
svn_shim_path = Pathname(Utils.popen_read(svn_shim, "--homebrew=print-path").chomp.presence)
|
||||
svn_paths = PATH.new(ENV["PATH"])
|
||||
svn_paths.prepend(svn_shim_path.dirname)
|
||||
|
||||
if OS.mac?
|
||||
xcrun_svn = Utils.popen_read("xcrun", "-f", "svn")
|
||||
svn_paths.append(File.dirname(xcrun_svn)) if $CHILD_STATUS.success? && xcrun_svn.present?
|
||||
end
|
||||
|
||||
svn = which("svn", svn_paths)
|
||||
skip "svn is not installed." unless svn
|
||||
|
||||
svnadmin = which("svnadmin", svn_paths)
|
||||
skip "Subversion is not installed." if !svn || !svnadmin
|
||||
skip "svnadmin is not installed." unless svnadmin
|
||||
|
||||
ENV["PATH"] = PATH.new(ENV["PATH"])
|
||||
.append(svn.dirname)
|
||||
@ -143,7 +149,7 @@ RSpec.configure do |config|
|
||||
end
|
||||
|
||||
config.before(:each, :needs_unzip) do
|
||||
skip "UnZip is not installed." unless which("unzip")
|
||||
skip "Unzip is not installed." unless which("unzip")
|
||||
end
|
||||
|
||||
config.around do |example|
|
||||
|
||||
@ -149,9 +149,8 @@ describe Utils::Git do
|
||||
expect { described_class.ensure_installed! }.to raise_error("Git is unavailable")
|
||||
end
|
||||
|
||||
unless ENV["HOMEBREW_TEST_GENERIC_OS"]
|
||||
it "installs git" do
|
||||
skip if ENV["HOMEBREW_TEST_GENERIC_OS"]
|
||||
|
||||
expect(described_class).to receive(:available?).and_return(false)
|
||||
expect(described_class).to receive(:safe_system).with(HOMEBREW_BREW_FILE, "install", "git").and_return(true)
|
||||
expect(described_class).to receive(:available?).and_return(true)
|
||||
@ -160,6 +159,7 @@ describe Utils::Git do
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "::remote_exists?" do
|
||||
it "returns true when git is not available" do
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user