-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update livecheck test fixtures to use
deprecate!
and disable!
- Loading branch information
Showing
5 changed files
with
63 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
...check/livecheck-discontinued-reference.rb → ...vecheck/livecheck-deprecated-reference.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
Library/Homebrew/test/support/fixtures/cask/Casks/livecheck/livecheck-deprecated.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
cask "livecheck-deprecated" do | ||
version "1.2.3" | ||
sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b" | ||
|
||
# This cask is used in --online tests, so we use fake URLs to avoid impacting | ||
# real servers. The URL paths are specific enough that they'll be | ||
# understandable if they appear in local server logs. | ||
url "http://localhost/homebrew/test/cask/audit/livecheck/deprecated-#{version}.dmg" | ||
name "Deprecated" | ||
desc "Cask for testing deprecated in livecheck" | ||
homepage "http://localhost/homebrew/test/cask/audit/livecheck/deprecated" | ||
|
||
deprecate! date: "2023-01-01", because: :discontinued | ||
|
||
app "TestCask.app" | ||
end |
18 changes: 18 additions & 0 deletions
18
Library/Homebrew/test/support/fixtures/cask/Casks/livecheck/livecheck-disabled-reference.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
cask "livecheck-disabled-reference" do | ||
version "1.2.3" | ||
sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b" | ||
|
||
# This cask is used in --online tests, so we use fake URLs to avoid impacting | ||
# real servers. The URL paths are specific enough that they'll be | ||
# understandable if they appear in local server logs. | ||
url "http://localhost/homebrew/test/cask/audit/livecheck/disabled-#{version}.dmg" | ||
name "Disabled Reference" | ||
desc "Cask for testing a livecheck reference to a disabled cask" | ||
homepage "http://localhost/homebrew/test/cask/audit/livecheck/disabled" | ||
|
||
livecheck do | ||
cask "livecheck/livecheck-disabled" | ||
end | ||
|
||
app "TestCask.app" | ||
end |
16 changes: 7 additions & 9 deletions
16
...Casks/livecheck/livecheck-discontinued.rb → ...ask/Casks/livecheck/livecheck-disabled.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,16 @@ | ||
cask "livecheck-discontinued" do | ||
cask "livecheck-disabled" do | ||
version "1.2.3" | ||
sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b" | ||
|
||
# This cask is used in --online tests, so we use fake URLs to avoid impacting | ||
# real servers. The URL paths are specific enough that they'll be | ||
# understandable if they appear in local server logs. | ||
url "http://localhost/homebrew/test/cask/audit/livecheck/discontinued-#{version}.dmg" | ||
name "Discontinued" | ||
desc "Cask for testing discontinued in livecheck" | ||
homepage "http://localhost/homebrew/test/cask/audit/livecheck/discontinued" | ||
url "http://localhost/homebrew/test/cask/audit/livecheck/disabled-#{version}.dmg" | ||
name "Disabled" | ||
desc "Cask for testing disabled in livecheck" | ||
homepage "http://localhost/homebrew/test/cask/audit/livecheck/disabled" | ||
|
||
app "TestCask.app" | ||
disable! date: "2023-01-01", because: :discontinued | ||
|
||
caveats do | ||
discontinued | ||
end | ||
app "TestCask.app" | ||
end |