diff options
| -rw-r--r-- | Library/Homebrew/dev-cmd/tests.rb | 10 | ||||
| -rw-r--r-- | Library/Homebrew/test/cask/artifact/suite_spec.rb | 13 | ||||
| -rw-r--r-- | Library/Homebrew/test/cask/installer_spec.rb | 104 | ||||
| -rw-r--r-- | Library/Homebrew/test/cmd/cask_spec.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/test/cmd/services_spec.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/test/gpg_spec.rb | 25 | ||||
| -rw-r--r-- | Library/Homebrew/test/support/fixtures/cask/Casks/container-air.rb | 9 | ||||
| -rw-r--r-- | Library/Homebrew/test/support/fixtures/cask/Casks/container-gpg.rb | 12 | ||||
| -rw-r--r-- | Library/Homebrew/test/support/fixtures/cask/Casks/container-lzma.rb | 11 | ||||
| -rw-r--r-- | Library/Homebrew/test/support/fixtures/cask/Casks/container-rar.rb | 11 | ||||
| -rw-r--r-- | Library/Homebrew/test/support/fixtures/cask/Casks/container-sit.rb | 11 | ||||
| -rw-r--r-- | Library/Homebrew/test/support/fixtures/cask/Casks/container-xz.rb | 11 | ||||
| -rw-r--r-- | completions/zsh/_brew | 6 | ||||
| -rw-r--r-- | docs/Manpage.md | 6 | ||||
| -rw-r--r-- | manpages/brew.1 | 5 | 
15 files changed, 9 insertions, 229 deletions
| diff --git a/Library/Homebrew/dev-cmd/tests.rb b/Library/Homebrew/dev-cmd/tests.rb index 13f4d7b1e..924629886 100644 --- a/Library/Homebrew/dev-cmd/tests.rb +++ b/Library/Homebrew/dev-cmd/tests.rb @@ -12,10 +12,8 @@  #:    If `--no-compat` is passed, do not load the compatibility layer when  #:    running tests.  #: -#:    If `--online` is passed, include tests that use the GitHub API. -#: -#:    If `--official-cmd-taps` is passed, include tests that use any of the -#:    taps for official external commands. +#:    If `--online` is passed, include tests that use the GitHub API and tests +#:    that use any of the taps for official external commands.  require "fileutils"  require "tap" @@ -40,10 +38,6 @@ module Homebrew          ENV["HOMEBREW_NO_GITHUB_API"] = "1"        end -      if ARGV.include? "--official-cmd-taps" -        ENV["HOMEBREW_TEST_OFFICIAL_CMD_TAPS"] = "1" -      end -        if ARGV.include? "--coverage"          ENV["HOMEBREW_TESTS_COVERAGE"] = "1"          FileUtils.rm_f "test/coverage/.resultset.json" diff --git a/Library/Homebrew/test/cask/artifact/suite_spec.rb b/Library/Homebrew/test/cask/artifact/suite_spec.rb index 98ae93311..eca6b6f17 100644 --- a/Library/Homebrew/test/cask/artifact/suite_spec.rb +++ b/Library/Homebrew/test/cask/artifact/suite_spec.rb @@ -10,19 +10,6 @@ describe Hbc::Artifact::Suite, :cask do      InstallHelper.install_without_artifacts(cask)    end -  it "moves the suite to the proper directory" do -    skip("flaky test") # FIXME - -    shutup do -      install_phase.call -    end - -    expect(target_path).to be_a_directory -    expect(target_path).to be_a_symlink -    expect(target_path.readlink).to exist -    expect(source_path).not_to exist -  end -    it "creates a suite containing the expected app" do      shutup do        install_phase.call diff --git a/Library/Homebrew/test/cask/installer_spec.rb b/Library/Homebrew/test/cask/installer_spec.rb index 0ae7c14a5..a32f71cab 100644 --- a/Library/Homebrew/test/cask/installer_spec.rb +++ b/Library/Homebrew/test/cask/installer_spec.rb @@ -37,45 +37,6 @@ describe Hbc::Installer, :cask do        expect(Hbc.appdir.join("container")).to be_a_file      end -    it "works with cab-based Casks" do -      skip("cabextract not installed") if which("cabextract").nil? -      asset = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/container-cab.rb") - -      allow(asset).to receive(:depends_on).and_return(empty_depends_on_stub) - -      shutup do -        Hbc::Installer.new(asset).install -      end - -      expect(Hbc.caskroom.join("container-cab", asset.version)).to be_a_directory -      expect(Hbc.appdir.join("container")).to be_a_file -    end - -    it "works with Adobe AIR-based Casks" do -      skip("Adobe AIR not installed") unless Hbc::Container::Air.installer_exist? -      asset = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/container-air.rb") - -      shutup do -        Hbc::Installer.new(asset).install -      end - -      expect(Hbc.caskroom.join("container-air", asset.version)).to be_a_directory -      expect(Hbc.appdir.join("container.app")).to be_a_directory -    end - -    it "works with 7z-based Casks" do -      skip("unar not installed") if which("unar").nil? -      asset = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/container-7z.rb") - -      allow(asset).to receive(:depends_on).and_return(empty_depends_on_stub) -      shutup do -        Hbc::Installer.new(asset).install -      end - -      expect(Hbc.caskroom.join("container-7z", asset.version)).to be_a_directory -      expect(Hbc.appdir.join("container")).to be_a_file -    end -      it "works with xar-based Casks" do        asset = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/container-xar.rb") @@ -87,32 +48,6 @@ describe Hbc::Installer, :cask do        expect(Hbc.appdir.join("container")).to be_a_file      end -    it "works with Stuffit-based Casks" do -      skip("unar not installed") if which("unar").nil? -      asset = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/container-sit.rb") - -      allow(asset).to receive(:depends_on).and_return(empty_depends_on_stub) -      shutup do -        Hbc::Installer.new(asset).install -      end - -      expect(Hbc.caskroom.join("container-sit", asset.version)).to be_a_directory -      expect(Hbc.appdir.join("container")).to be_a_file -    end - -    it "works with RAR-based Casks" do -      skip("unar not installed") if which("unar").nil? -      asset = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/container-rar.rb") - -      allow(asset).to receive(:depends_on).and_return(empty_depends_on_stub) -      shutup do -        Hbc::Installer.new(asset).install -      end - -      expect(Hbc.caskroom.join("container-rar", asset.version)).to be_a_directory -      expect(Hbc.appdir.join("container")).to be_a_file -    end -      it "works with pure bzip2-based Casks" do        asset = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/container-bzip2.rb") @@ -135,45 +70,6 @@ describe Hbc::Installer, :cask do        expect(Hbc.appdir.join("container")).to be_a_file      end -    it "works with pure xz-based Casks" do -      skip("unxz not installed") if which("unxz").nil? -      asset = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/container-xz.rb") - -      allow(asset).to receive(:depends_on).and_return(empty_depends_on_stub) -      shutup do -        Hbc::Installer.new(asset).install -      end - -      expect(Hbc.caskroom.join("container-xz", asset.version)).to be_a_directory -      expect(Hbc.appdir.join("container-xz--#{asset.version}")).to be_a_file -    end - -    it "works with lzma-based Casks" do -      skip("unlzma not installed") if which("unlzma").nil? -      asset = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/container-lzma.rb") - -      allow(asset).to receive(:depends_on).and_return(empty_depends_on_stub) -      shutup do -        Hbc::Installer.new(asset).install -      end - -      expect(Hbc.caskroom.join("container-lzma", asset.version)).to be_a_directory -      expect(Hbc.appdir.join("container-lzma--#{asset.version}")).to be_a_file -    end - -    it "works with gpg-based Casks" do -      skip("gpg not installed") if which("gpg").nil? -      asset = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/container-gpg.rb") - -      allow(asset).to receive(:depends_on).and_return(empty_depends_on_stub) -      shutup do -        Hbc::Installer.new(asset).install -      end - -      expect(Hbc.caskroom.join("container-gpg", asset.version)).to be_a_directory -      expect(Hbc.appdir.join("container")).to be_a_file -    end -      it "blows up on a bad checksum" do        bad_checksum = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/bad-checksum.rb")        expect { diff --git a/Library/Homebrew/test/cmd/cask_spec.rb b/Library/Homebrew/test/cmd/cask_spec.rb index fcd7e6a16..3bba5fbf4 100644 --- a/Library/Homebrew/test/cmd/cask_spec.rb +++ b/Library/Homebrew/test/cmd/cask_spec.rb @@ -1,4 +1,4 @@ -describe "brew cask", :integration_test, :needs_macos, :needs_official_cmd_taps do +describe "brew cask", :integration_test, :needs_macos, :needs_network do    describe "list" do      it "returns a list of installed Casks" do        setup_remote_tap("caskroom/cask") diff --git a/Library/Homebrew/test/cmd/services_spec.rb b/Library/Homebrew/test/cmd/services_spec.rb index c456fea17..669e84e5f 100644 --- a/Library/Homebrew/test/cmd/services_spec.rb +++ b/Library/Homebrew/test/cmd/services_spec.rb @@ -1,4 +1,4 @@ -describe "brew services", :integration_test, :needs_macos, :needs_official_cmd_taps do +describe "brew services", :integration_test, :needs_macos, :needs_network do    it "allows controlling services" do      setup_remote_tap "homebrew/services" diff --git a/Library/Homebrew/test/gpg_spec.rb b/Library/Homebrew/test/gpg_spec.rb deleted file mode 100644 index 160e55379..000000000 --- a/Library/Homebrew/test/gpg_spec.rb +++ /dev/null @@ -1,25 +0,0 @@ -require "gpg" - -describe Gpg do -  subject { described_class } - -  describe "::create_test_key" do -    it "creates a test key in the home directory" do -      skip "GPG Unavailable" unless subject.available? - -      mktmpdir do |dir| -        ENV["HOME"] = dir - -        shutup do -          subject.create_test_key(dir) -        end - -        if subject.version == Version.create("2.0") -          expect(dir/".gnupg/secring.gpg").to be_a_file -        else -          expect(dir/".gnupg/pubring.kbx").to be_a_file -        end -      end -    end -  end -end diff --git a/Library/Homebrew/test/support/fixtures/cask/Casks/container-air.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/container-air.rb deleted file mode 100644 index 5aaf3d53e..000000000 --- a/Library/Homebrew/test/support/fixtures/cask/Casks/container-air.rb +++ /dev/null @@ -1,9 +0,0 @@ -cask 'container-air' do -  version '0.1' -  sha256 '554472e163f8a028629b12b468e29acda9f16b223dff74fcd218bba73cc2365a' - -  url "file://#{TEST_FIXTURE_DIR}/cask/container.air" -  homepage 'https://example.com/container-air' - -  app 'container.app' -end diff --git a/Library/Homebrew/test/support/fixtures/cask/Casks/container-gpg.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/container-gpg.rb deleted file mode 100644 index 630527ce2..000000000 --- a/Library/Homebrew/test/support/fixtures/cask/Casks/container-gpg.rb +++ /dev/null @@ -1,12 +0,0 @@ -cask 'container-gpg' do -  version '1.2.3' -  sha256 :no_check - -  url "file://#{TEST_FIXTURE_DIR}/cask/container.tar.xz.gpg" -  gpg :embedded, key_id: 'B0976E51E5C047AD0FD051294E402EBF7C3C6A71' - -  homepage 'https://example.com/container-gpg' -  depends_on formula: 'gpg' - -  app 'container' -end diff --git a/Library/Homebrew/test/support/fixtures/cask/Casks/container-lzma.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/container-lzma.rb deleted file mode 100644 index 92d2c253e..000000000 --- a/Library/Homebrew/test/support/fixtures/cask/Casks/container-lzma.rb +++ /dev/null @@ -1,11 +0,0 @@ -cask 'container-lzma' do -  version '1.2.3' -  sha256 '9d7edb32d02ab9bd9749a5bde8756595ea4cfcb1da02ca11c30fb591d4c1ed85' - -  url "file://#{TEST_FIXTURE_DIR}/cask/container.lzma" -  homepage 'https://example.com/container-lzma' - -  depends_on formula: 'lzma' - -  app 'container-lzma--1.2.3' -end diff --git a/Library/Homebrew/test/support/fixtures/cask/Casks/container-rar.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/container-rar.rb deleted file mode 100644 index 33ea670d1..000000000 --- a/Library/Homebrew/test/support/fixtures/cask/Casks/container-rar.rb +++ /dev/null @@ -1,11 +0,0 @@ -cask 'container-rar' do -  version '1.2.3' -  sha256 '419af7864c0e1f125515c49b08bd22e0f7de39f5285897c440fe03c714871763' - -  url "file://#{TEST_FIXTURE_DIR}/cask/container.rar" -  homepage 'https://example.com/container-rar' - -  depends_on formula: 'unar' - -  app 'container' -end diff --git a/Library/Homebrew/test/support/fixtures/cask/Casks/container-sit.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/container-sit.rb deleted file mode 100644 index 5715795a7..000000000 --- a/Library/Homebrew/test/support/fixtures/cask/Casks/container-sit.rb +++ /dev/null @@ -1,11 +0,0 @@ -cask 'container-sit' do -  version '1.2.3' -  sha256 '0d21a64dce625044345c8ecca888e5439feaf254dac7f884917028a744f93cf3' - -  url "file://#{TEST_FIXTURE_DIR}/cask/container.sit" -  homepage 'https://example.com/container-sit' - -  depends_on formula: 'unar' - -  app 'container' -end diff --git a/Library/Homebrew/test/support/fixtures/cask/Casks/container-xz.rb b/Library/Homebrew/test/support/fixtures/cask/Casks/container-xz.rb deleted file mode 100644 index 3f844af04..000000000 --- a/Library/Homebrew/test/support/fixtures/cask/Casks/container-xz.rb +++ /dev/null @@ -1,11 +0,0 @@ -cask 'container-xz' do -  version '1.2.3' -  sha256 '839263f474edde1d54a9101606e6f0dc9d963acc93f6dcc5af8d10ebc3187c02' - -  url "file://#{TEST_FIXTURE_DIR}/cask/container.xz" -  homepage 'https://example.com/container-xz' - -  depends_on formula: 'xz' - -  app 'container-xz--1.2.3' -end diff --git a/completions/zsh/_brew b/completions/zsh/_brew index 970b4f899..61dc26b42 100644 --- a/completions/zsh/_brew +++ b/completions/zsh/_brew @@ -676,8 +676,7 @@ _brew_test_bot() {  }  # brew tests [-v] [--coverage] [--generic] [--no-compat] -#   [--only=test_script:test_method] [--seed seed] [--trace] [--online] -#   [--official-cmd-taps]: +#   [--only=test_script:test_method] [--seed seed] [--trace] [--online]:  _brew_tests() {    _arguments \    '(-v)-v' \ @@ -687,8 +686,7 @@ _brew_tests() {    '(--only)--only=-:test_method: ' \    '(--seed)--seed:seed: ' \    '(--trace)--trace' \ -  '(--online)--online' \ -  '(--official-cmd-taps)--official-cmd-taps' +  '(--online)--online'  }  # brew uninstall, rm, remove [--force] formula: diff --git a/docs/Manpage.md b/docs/Manpage.md index 523eaf289..aa20b3367 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -845,10 +845,8 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note      If `--no-compat` is passed, do not load the compatibility layer when      running tests. -    If `--online` is passed, include tests that use the GitHub API. - -    If `--official-cmd-taps` is passed, include tests that use any of the -    taps for official external commands. +    If `--online` is passed, include tests that use the GitHub API and tests +    that use any of the taps for official external commands.    * `update-test` [`--commit=``commit`] [`--before=``date`] [`--to-tag`] [`--keep-tmp`]:      Runs a test of `brew update` with a new repository clone. diff --git a/manpages/brew.1 b/manpages/brew.1 index 5aa07a460..c05702c68 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -879,10 +879,7 @@ If \fB\-\-generic\fR is passed, only run OS\-agnostic tests\.  If \fB\-\-no\-compat\fR is passed, do not load the compatibility layer when running tests\.  .  .IP -If \fB\-\-online\fR is passed, include tests that use the GitHub API\. -. -.IP -If \fB\-\-official\-cmd\-taps\fR is passed, include tests that use any of the taps for official external commands\. +If \fB\-\-online\fR is passed, include tests that use the GitHub API and tests that use any of the taps for official external commands\.  .  .TP  \fBupdate\-test\fR [\fB\-\-commit=\fR\fIcommit\fR] [\fB\-\-before=\fR\fIdate\fR] [\fB\-\-to\-tag\fR] [\fB\-\-keep\-tmp\fR] | 
