tests: use more recent git committer date

This will allow the `brew bundle` test to use the default git
environment.
This commit is contained in:
Alyssa Ross 2017-01-22 20:45:15 +00:00
parent 9c3d01c682
commit b53ce62ffb
5 changed files with 12 additions and 12 deletions

View File

@ -180,7 +180,7 @@ class GitDownloadStrategyTests < Homebrew::TestCase
def test_source_modified_time def test_source_modified_time
setup_git_repo setup_git_repo
assert_equal 1_242_860_651, @strategy.source_modified_time.to_i assert_equal 1_485_115_153, @strategy.source_modified_time.to_i
end end
def test_last_commit def test_last_commit
@ -191,7 +191,7 @@ class GitDownloadStrategyTests < Homebrew::TestCase
git_commit_all git_commit_all
end end
end end
assert_equal "c50c79b", @strategy.last_commit assert_equal "f68266e", @strategy.last_commit
end end
def test_fetch_last_commit def test_fetch_last_commit
@ -216,7 +216,7 @@ class GitDownloadStrategyTests < Homebrew::TestCase
end end
@strategy.shutup! @strategy.shutup!
assert_equal "c50c79b", @strategy.fetch_last_commit assert_equal "f68266e", @strategy.fetch_last_commit
ensure ensure
remote_repo.rmtree if remote_repo.directory? remote_repo.rmtree if remote_repo.directory?
end end

View File

@ -1090,7 +1090,7 @@ class OutdatedVersionsTests < Homebrew::TestCase
outdated_stable_prefix = HOMEBREW_CELLAR.join("testball/1.0") outdated_stable_prefix = HOMEBREW_CELLAR.join("testball/1.0")
head_prefix_a = HOMEBREW_CELLAR.join("testball/HEAD") head_prefix_a = HOMEBREW_CELLAR.join("testball/HEAD")
head_prefix_b = HOMEBREW_CELLAR.join("testball/HEAD-aaaaaaa_1") head_prefix_b = HOMEBREW_CELLAR.join("testball/HEAD-aaaaaaa_1")
head_prefix_c = HOMEBREW_CELLAR.join("testball/HEAD-5658946") head_prefix_c = HOMEBREW_CELLAR.join("testball/HEAD-18a7103")
setup_tab_for_prefix(outdated_stable_prefix) setup_tab_for_prefix(outdated_stable_prefix)
tab_a = setup_tab_for_prefix(head_prefix_a, versions: { "stable" => "1.0" }) tab_a = setup_tab_for_prefix(head_prefix_a, versions: { "stable" => "1.0" })

View File

@ -100,10 +100,10 @@ class IntegrationCommandTestInstall < IntegrationCommandTestCase
# Ignore dependencies, because we'll try to resolve requirements in build.rb # Ignore dependencies, because we'll try to resolve requirements in build.rb
# and there will be the git requirement, but we cannot instantiate git # and there will be the git requirement, but we cannot instantiate git
# formula since we only have testball1 formula. # formula since we only have testball1 formula.
assert_match "#{HOMEBREW_CELLAR}/testball1/HEAD-2ccdf4f", cmd("install", "testball1", "--HEAD", "--ignore-dependencies") assert_match "#{HOMEBREW_CELLAR}/testball1/HEAD-d5eb689", cmd("install", "testball1", "--HEAD", "--ignore-dependencies")
assert_match "testball1-HEAD-2ccdf4f already installed", assert_match "testball1-HEAD-d5eb689 already installed",
cmd("install", "testball1", "--HEAD", "--ignore-dependencies") cmd("install", "testball1", "--HEAD", "--ignore-dependencies")
assert_match "#{HOMEBREW_CELLAR}/testball1/HEAD-2ccdf4f", cmd("unlink", "testball1") assert_match "#{HOMEBREW_CELLAR}/testball1/HEAD-d5eb689", cmd("unlink", "testball1")
assert_match "#{HOMEBREW_CELLAR}/testball1/1.0", cmd("install", "testball1") assert_match "#{HOMEBREW_CELLAR}/testball1/1.0", cmd("install", "testball1")
end end

View File

@ -21,7 +21,7 @@ module Test
git_env = ["AUTHOR", "COMMITTER"].each_with_object({}) do |role, env| git_env = ["AUTHOR", "COMMITTER"].each_with_object({}) do |role, env|
env["GIT_#{role}_NAME"] = "brew tests" env["GIT_#{role}_NAME"] = "brew tests"
env["GIT_#{role}_EMAIL"] = "brew-tests@localhost" env["GIT_#{role}_EMAIL"] = "brew-tests@localhost"
env["GIT_#{role}_DATE"] = "Thu May 21 00:04:11 2009 +0100" env["GIT_#{role}_DATE"] = "Sun Jan 22 19:59:13 2017 +0000"
end end
with_environment(git_env) do with_environment(git_env) do

View File

@ -177,10 +177,10 @@ class TapTest < Homebrew::TestCase
touch @path/"README" touch @path/"README"
setup_git_repo setup_git_repo
assert_equal "e1893a6bd191ba895c71b652ff8376a6114c7fa7", @tap.git_head assert_equal "0453e16c8e3fac73104da50927a86221ca0740c2", @tap.git_head
assert_equal "e189", @tap.git_short_head assert_equal "0453", @tap.git_short_head
assert_match "years ago", @tap.git_last_commit assert_match "ago", @tap.git_last_commit
assert_equal "2009-05-21", @tap.git_last_commit_date assert_equal "2017-01-22", @tap.git_last_commit_date
end end
def test_private_remote def test_private_remote