]> source.dussan.org Git - redmine.git/commitdiff
scm: git: update test repository (#8857)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 9 Feb 2012 08:20:37 +0000 (08:20 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 9 Feb 2012 08:20:37 +0000 (08:20 +0000)
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

test/fixtures/repositories/git_repository.tar.gz
test/functional/repositories_git_controller_test.rb
test/unit/lib/redmine/scm/adapters/git_adapter_test.rb
test/unit/repository_git_test.rb

index 3d3c73918a71d14546f33910a1e56800c077c58d..f2a6298295571d05ae1df4df0491d636c331b3dc 100644 (file)
Binary files a/test/fixtures/repositories/git_repository.tar.gz and b/test/fixtures/repositories/git_repository.tar.gz differ
index 24a9fad2d872aaa8816b05a48320fdd79a47cc2f..75917df2b471d4af43ab07d98741982c5193edc1 100644 (file)
@@ -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.
index a37dfbbdef5a3d99019d193b60568bc0e452cfe8..dd158120f419dd4925e1f0bf4920f565dc128f99 100644 (file)
@@ -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
index c40f4df14cacb768fb18e853a7a12c5907e031f2..4d01eed2c32cf6c1deae85e1d64653bc3c964728 100644 (file)
@@ -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