summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-02-09 08:20:37 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-02-09 08:20:37 +0000
commite34dab74436d44a99c37b061509d9e3594d0ed24 (patch)
treed779ad1e17d2ef0a2a2aa66412f2b265350b7afb
parenta9ad2a4dcc4888c12f36ed89de3be1c4cd034fdc (diff)
downloadredmine-e34dab74436d44a99c37b061509d9e3594d0ed24.tar.gz
redmine-e34dab74436d44a99c37b061509d9e3594d0ed24.zip
scm: git: update test repository (#8857)
New disjointed history revisions are added. This test repository has two origins. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8820 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--test/fixtures/repositories/git_repository.tar.gzbin18538 -> 20998 bytes
-rw-r--r--test/functional/repositories_git_controller_test.rb2
-rw-r--r--test/unit/lib/redmine/scm/adapters/git_adapter_test.rb6
-rw-r--r--test/unit/repository_git_test.rb20
4 files changed, 15 insertions, 13 deletions
diff --git a/test/fixtures/repositories/git_repository.tar.gz b/test/fixtures/repositories/git_repository.tar.gz
index 3d3c73918..f2a629829 100644
--- a/test/fixtures/repositories/git_repository.tar.gz
+++ b/test/fixtures/repositories/git_repository.tar.gz
Binary files differ
diff --git a/test/functional/repositories_git_controller_test.rb b/test/functional/repositories_git_controller_test.rb
index 24a9fad2d..75917df2b 100644
--- a/test/functional/repositories_git_controller_test.rb
+++ b/test/functional/repositories_git_controller_test.rb
@@ -27,7 +27,7 @@ class RepositoriesGitControllerTest < ActionController::TestCase
REPOSITORY_PATH.gsub!(/\//, "\\") if Redmine::Platform.mswin?
PRJ_ID = 3
CHAR_1_HEX = "\xc3\x9c"
- NUM_REV = 21
+ NUM_REV = 28
## Git, Mercurial and CVS path encodings are binary.
## Subversion supports URL encoding for path.
diff --git a/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb
index a37dfbbde..dd158120f 100644
--- a/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb
+++ b/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb
@@ -65,7 +65,11 @@ begin
@adapter.branches.each do |b|
brs << b
end
- assert_equal 4, brs.length
+ assert_equal 5, brs.length
+ br_issue_8857 = brs[-5]
+ assert_equal 'issue-8857', br_issue_8857.to_s
+ assert_equal '2a682156a3b6e77a8bf9cd4590e8db757f3c6c78', br_issue_8857.revision
+ assert_equal br_issue_8857.scmid, br_issue_8857.revision
br_latin_1_path = brs[-4]
assert_equal 'latin-1-path-encoding', br_latin_1_path.to_s
assert_equal '1ca7f5ed374f3cb31a93ae5215c2e25cc6ec5127', br_latin_1_path.revision
diff --git a/test/unit/repository_git_test.rb b/test/unit/repository_git_test.rb
index c40f4df14..4d01eed2c 100644
--- a/test/unit/repository_git_test.rb
+++ b/test/unit/repository_git_test.rb
@@ -23,7 +23,7 @@ class RepositoryGitTest < ActiveSupport::TestCase
REPOSITORY_PATH = Rails.root.join('tmp/test/git_repository').to_s
REPOSITORY_PATH.gsub!(/\//, "\\") if Redmine::Platform.mswin?
- NUM_REV = 21
+ NUM_REV = 28
FELIX_HEX = "Felix Sch\xC3\xA4fer"
CHAR_1_HEX = "\xc3\x9c"
@@ -71,7 +71,7 @@ class RepositoryGitTest < ActiveSupport::TestCase
@project.reload
assert_equal NUM_REV, @repository.changesets.count
- assert_equal 33, @repository.changes.count
+ assert_equal 39, @repository.changes.count
commit = @repository.changesets.find(:first, :order => 'committed_on ASC')
assert_equal "Initial import.\nThe repository contains 3 files.", commit.comments
@@ -87,7 +87,7 @@ class RepositoryGitTest < ActiveSupport::TestCase
assert_equal "README", change.path
assert_equal "A", change.action
- assert_equal 4, @repository.extra_info["branches"].size
+ assert_equal 5, @repository.extra_info["branches"].size
end
def test_fetch_changesets_incremental
@@ -95,9 +95,7 @@ class RepositoryGitTest < ActiveSupport::TestCase
@repository.fetch_changesets
@project.reload
assert_equal NUM_REV, @repository.changesets.count
- assert_equal 33, @repository.changes.count
extra_info_db = @repository.extra_info["branches"]
- assert_equal 4, extra_info_db.size
assert_equal "1ca7f5ed374f3cb31a93ae5215c2e25cc6ec5127",
extra_info_db["latin-1-path-encoding"]["last_scmid"]
assert_equal "83ca5fd546063a3c7dc2e568ba3355661a9e2b2c",
@@ -116,7 +114,7 @@ class RepositoryGitTest < ActiveSupport::TestCase
end
@project.reload
cs1 = @repository.changesets
- assert_equal 15, cs1.count
+ assert_equal 22, cs1.count
h = @repository.extra_info.dup
h["branches"]["master"]["last_scmid"] =
"4a07fe31bffcf2888791f3e6cbc9c4545cefe3e8"
@@ -138,7 +136,7 @@ class RepositoryGitTest < ActiveSupport::TestCase
@project.reload
assert_equal NUM_REV, @repository.changesets.count
extra_info_db = @repository.extra_info["branches"]
- assert_equal 4, extra_info_db.size
+ assert_equal 5, extra_info_db.size
assert_equal "1ca7f5ed374f3cb31a93ae5215c2e25cc6ec5127",
extra_info_db["latin-1-path-encoding"]["last_scmid"]
assert_equal "83ca5fd546063a3c7dc2e568ba3355661a9e2b2c",
@@ -157,7 +155,7 @@ class RepositoryGitTest < ActiveSupport::TestCase
end
@project.reload
cs1 = @repository.changesets
- assert_equal 15, cs1.count
+ assert_equal 22, cs1.count
h = @repository.extra_info.dup
h["branches"]["master"]["last_scmid"] =
"abcd1234efgh"
@@ -170,7 +168,7 @@ class RepositoryGitTest < ActiveSupport::TestCase
@repository.fetch_changesets
@project.reload
- assert_equal 15, @repository.changesets.count
+ assert_equal 22, @repository.changesets.count
end
def test_parents
@@ -227,7 +225,7 @@ class RepositoryGitTest < ActiveSupport::TestCase
end
@project.reload
cs1 = @repository.changesets
- assert_equal 15, cs1.count
+ assert_equal NUM_REV - 6, cs1.count
assert_equal 0, @repository.extra_info["db_consistent"]["ordering"]
h = @repository.extra_info.dup
h["branches"]["master"]["last_scmid"] =
@@ -479,7 +477,7 @@ class RepositoryGitTest < ActiveSupport::TestCase
@repository.fetch_changesets
@project.reload
assert_equal NUM_REV, @repository.changesets.count
- %w|7234cb2750b63f47bff735edc50a1c0a433c2518 7234cb2|.each do |r1|
+ %w|95488a44bc25f7d1f97d775a31359539ff333a63 95488a44b|.each do |r1|
changeset = @repository.find_changeset_by_name(r1)
assert_nil changeset.previous
end