49 Commits

Author SHA1 Message Date
Mike McQuaid
1e5cfcc028
Separate tap tests into separate, correct files. 2019-03-27 13:35:42 +00:00
Mike McQuaid
59d680a626
dev-cmd: only one integration test per command.
Integration tests are useful in detecting breakages but much slower so
let's only use one per command and install formula outside the
integration test framework (which is also slow).
2019-03-27 09:45:48 +00:00
Mike McQuaid
e095da4d01
rubocop: enable Layout/EmptyLineAfterGuardClause. 2019-02-21 12:55:49 +00:00
Markus Reiter
78d4373543 Simplify DEFAULT_DIRS. 2019-02-15 10:09:14 +01:00
Markus Reiter
fda6e0cab3 Split cask config into three tiers. 2019-02-15 10:09:14 +01:00
Markus Reiter
1e1ce1c471 Save config file for casks. 2019-02-15 10:09:14 +01:00
Claudia
5be80a78f6
Use Homebrew-controlled domain for Cask dummy URLs
In a number of Cask specs, the value of the `homepage` stanza is currently set
to https://example.com. As of 2018-11-28, the TLS certificate served by
example.com seems to be expired, possibly due to an oversight on ICANN’s side.

While the certificate is certainly going to be renewed soon, it would be
desirable for Homebrew’s test result to be less dependent on ICANN’s actions.
This commit changes the homepages of all test Casks to http://brew.sh, whose
domain and TLS certificate are both controlled by Homebrew.
2018-11-28 20:51:55 +01:00
Markus Reiter
cea9942a1d Fix code style. 2018-11-13 05:04:35 +01:00
Mike McQuaid
737b84b54b
brew style --fix fixes. 2018-11-02 17:29:23 +00:00
Markus Reiter
c4d418e126 Use ActiveSupport’s #second. 2018-10-07 23:10:56 +02:00
Mike McQuaid
ac2aabf287
setup_remote_tap: use system taps.
This saves recloning the taps we use multiple times when already done by
the user.
2018-10-03 19:14:04 +01:00
Markus Reiter
e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02:00
Markus Reiter
a84a1c63db Rename Hbc module to Cask. 2018-09-06 09:30:52 +02:00
Mike McQuaid
e06f8a8beb
Rename Homebrew-Cask to Homebrew Cask. 2018-09-04 09:56:57 +01:00
Mike McQuaid
90b3a13909
cask: move cask/lib/hbc/* to cask/*.
Fix the load path, requires and some filenames accordingly.
2018-09-04 09:56:57 +01:00
Markus Reiter
55cde526a8 Deprecate brew cask cleanup. 2018-08-13 20:09:34 +02:00
Markus Reiter
5841b992ac Refactor $LOAD_PATH. 2018-07-17 23:38:57 +02:00
Markus Reiter
1f56314365 Clear Tap cache before each example. 2018-07-16 10:55:22 +02:00
Shaun Jackman
1b688a3a25 Relocate bottles on Linux using patchelf
Ensure patchelf is installed to pour bottles and build bottles.
2018-07-12 10:21:26 -07:00
Markus Reiter
7762ce32aa Use more descriptive heredoc names. 2018-07-11 18:15:30 +02:00
Markus Reiter
18e46b3ec2 Fix usage of HOMEBREW_LOAD_PATH. 2018-06-18 16:23:35 +02:00
Markus Reiter
1d27c5f79a Don't create Caskroom.path for tests. 2018-06-09 11:32:49 +02:00
Markus Reiter
b2f67c6d77 Remove the need for ensure_cache_exists. 2018-06-09 11:13:37 +02:00
Markus Reiter
12ab263784 Remove Hbc.default_tap. 2018-06-09 10:13:28 +02:00
Markus Reiter
fee2b56e14 Rename Cask tap for specs. 2018-06-09 10:03:21 +02:00
Markus Reiter
3d423b0587 Add path method to Caskroom and Cache. 2018-06-09 09:52:48 +02:00
Markus Reiter
42e34db562 Always add cask/lib to $LOAD_PATH. 2018-06-07 18:42:30 +02:00
Markus Reiter
b4de801a01 Support both Homebrew and caskroom for now. 2018-05-21 01:43:49 +02:00
Mike McQuaid
5e1806e796 test: rubocop-rspec style auto-corrects.
There’s too many warnings to start enabling `rubocop-rspec` by default
but let’s at least apply the cleanups it does automatically.
2018-03-25 13:30:37 +01:00
Markus Reiter
6760d26319 Create Hbc::Config class. 2018-01-27 21:47:18 +01:00
Markus Reiter
a02ce4f8e9 Also remove writer method for Hbc.binarydir. 2017-12-03 10:09:09 +01:00
Markus Reiter
e4bb09dd40 Remove unused writer methods for Hbc.caskroom and Hbc.cache. 2017-12-03 09:58:01 +01:00
Bob W. Hogg
3cd869651b Add test fixtures for ELF executables
Add test/support/fixtures/elf/
and test/support/fixtures/tarballs/testball-0.1-linux.tbz
2017-11-26 08:37:57 -08:00
Markus Reiter
9bee9ca575 Use “squiggly” heredocs. 2017-10-18 14:39:09 +02:00
Dan Wendorf
acf1b278ae List cask full-names
`brew cask list` supports the `--full-name` flag which will include the tap
name for casks not part of the core caskroom/cask tap. For example, if
cask "foo-beta" is installed from the caskroom/versions cask, `brew cask
list --full-name` will report the name as "caskroom/versions/foo-beta".
2017-09-16 10:00:06 -07:00
Markus Reiter
2ad3a87045 Silence all specs by default. 2017-07-29 20:25:37 +02:00
Mike McQuaid
8b63214c2e integration_test: try tests on Gem load failure.
This should help with debugging `Gem::LoadError`s (e.g. for
https://github.com/Homebrew/homebrew-test-bot/pull/111).
2017-07-13 17:25:34 +01:00
Mike McQuaid
cabb7e898a integration_test: add simplecov libs when needed.
Don't add these unconditionally or with Bundler to speed things up a
bit. Also, to speed things up further cache these arguments so we don't
have to do the same generation every time.
2017-07-10 07:51:04 +01:00
Mike McQuaid
cb3a47d9e2 Fix brew tests on High Sierra.
The `brew test` tests were failing as they were unable to include
`test/unit/assertions`. This is because it's a gem and we were setting
the `GEM_HOME` so system gems were being ignored.

While I was there and examining the `$LOAD_PATH`: reduce the number of
things we add there by using `Bundler.with_clean_env` and only adding
`HOMEBREW_LIBRARY_PATH` in the `$LOAD_PATH` if it isn't already there
(which it always is [and has to be] for integration tests).

This also seems to have the side effect of speeding up integration
tests from 1m26s to 1m8s on my machine.
2017-07-07 15:20:19 +01:00
Mike McQuaid
57db2e539e Revert "Merge pull request #2597 from MikeMcQuaid/vendor-gems"
This reverts commit 3e4547f52e7ebec633f8bfefc8a396d944edf908, reversing
changes made to 6edf9382bcc1240ad6f97c8b752cfe56cef9965d.
2017-05-07 17:28:39 +01:00
Mike McQuaid
ee253e465b Vendor all Homebrew's gems.
Homebrew's actually ended up using a fair few gems. While we want to
avoid Bundler at runtime (and this PR still does that, in fact uses
Bundler even less at runtime than it did before) writing our own version
to use at build-time seems redundant.
2017-05-07 13:52:57 +01:00
Mike McQuaid
d02b4f321d Hide sensitive tokens from install/test/post.
Hide these tokens to avoid malicious subprocesses e.g. sending them
over the network. Also, support using these tokens with environment
filtering and clear `HOMEBREW_PATH` from subprocesses to stop them
sniffing it. Finally, use `HOMEBREW_PATH` to detect Homebrew’s user’s
PATH for e.g. `brew doctor` etc.
2017-04-22 16:31:19 +01:00
Markus Reiter
b24dc2268a Move brew cask --version into separate file. 2017-03-08 15:49:37 +01:00
Markus Reiter
9fc6c7b2be Move Cask specs into brew tests. 2017-03-05 23:08:14 +01:00
Markus Reiter
487294f815 Remove Minitest. 2017-02-28 22:48:57 +01:00
Markus Reiter
83c1b39946 Use around hook for shared "integration test" context. 2017-02-27 16:36:02 +01:00
Markus Reiter
ec0f2187a2 Avoid warnings when HOMEBREW_PREFIX/bin is not in PATH. 2017-02-25 09:08:05 +01:00
Markus Reiter
9dda84ad6b Add integration test helper methods. 2017-02-23 09:23:22 +01:00
Markus Reiter
8bb46baebb Add RSpec support for integration commands. 2017-02-21 20:23:47 +01:00