##// END OF EJS Templates
scm: git: update test repository (#8857)...
Toshi MARUYAMA -
r8700:e34dab74436d
parent child
Show More
1 NO CONTENT: modified file, binary diff hidden
NO CONTENT: modified file, binary diff hidden
@@ -27,7 +27,7 class RepositoriesGitControllerTest < ActionController::TestCase
27 REPOSITORY_PATH.gsub!(/\//, "\\") if Redmine::Platform.mswin?
27 REPOSITORY_PATH.gsub!(/\//, "\\") if Redmine::Platform.mswin?
28 PRJ_ID = 3
28 PRJ_ID = 3
29 CHAR_1_HEX = "\xc3\x9c"
29 CHAR_1_HEX = "\xc3\x9c"
30 NUM_REV = 21
30 NUM_REV = 28
31
31
32 ## Git, Mercurial and CVS path encodings are binary.
32 ## Git, Mercurial and CVS path encodings are binary.
33 ## Subversion supports URL encoding for path.
33 ## Subversion supports URL encoding for path.
@@ -65,7 +65,11 begin
65 @adapter.branches.each do |b|
65 @adapter.branches.each do |b|
66 brs << b
66 brs << b
67 end
67 end
68 assert_equal 4, brs.length
68 assert_equal 5, brs.length
69 br_issue_8857 = brs[-5]
70 assert_equal 'issue-8857', br_issue_8857.to_s
71 assert_equal '2a682156a3b6e77a8bf9cd4590e8db757f3c6c78', br_issue_8857.revision
72 assert_equal br_issue_8857.scmid, br_issue_8857.revision
69 br_latin_1_path = brs[-4]
73 br_latin_1_path = brs[-4]
70 assert_equal 'latin-1-path-encoding', br_latin_1_path.to_s
74 assert_equal 'latin-1-path-encoding', br_latin_1_path.to_s
71 assert_equal '1ca7f5ed374f3cb31a93ae5215c2e25cc6ec5127', br_latin_1_path.revision
75 assert_equal '1ca7f5ed374f3cb31a93ae5215c2e25cc6ec5127', br_latin_1_path.revision
@@ -23,7 +23,7 class RepositoryGitTest < ActiveSupport::TestCase
23 REPOSITORY_PATH = Rails.root.join('tmp/test/git_repository').to_s
23 REPOSITORY_PATH = Rails.root.join('tmp/test/git_repository').to_s
24 REPOSITORY_PATH.gsub!(/\//, "\\") if Redmine::Platform.mswin?
24 REPOSITORY_PATH.gsub!(/\//, "\\") if Redmine::Platform.mswin?
25
25
26 NUM_REV = 21
26 NUM_REV = 28
27
27
28 FELIX_HEX = "Felix Sch\xC3\xA4fer"
28 FELIX_HEX = "Felix Sch\xC3\xA4fer"
29 CHAR_1_HEX = "\xc3\x9c"
29 CHAR_1_HEX = "\xc3\x9c"
@@ -71,7 +71,7 class RepositoryGitTest < ActiveSupport::TestCase
71 @project.reload
71 @project.reload
72
72
73 assert_equal NUM_REV, @repository.changesets.count
73 assert_equal NUM_REV, @repository.changesets.count
74 assert_equal 33, @repository.changes.count
74 assert_equal 39, @repository.changes.count
75
75
76 commit = @repository.changesets.find(:first, :order => 'committed_on ASC')
76 commit = @repository.changesets.find(:first, :order => 'committed_on ASC')
77 assert_equal "Initial import.\nThe repository contains 3 files.", commit.comments
77 assert_equal "Initial import.\nThe repository contains 3 files.", commit.comments
@@ -87,7 +87,7 class RepositoryGitTest < ActiveSupport::TestCase
87 assert_equal "README", change.path
87 assert_equal "README", change.path
88 assert_equal "A", change.action
88 assert_equal "A", change.action
89
89
90 assert_equal 4, @repository.extra_info["branches"].size
90 assert_equal 5, @repository.extra_info["branches"].size
91 end
91 end
92
92
93 def test_fetch_changesets_incremental
93 def test_fetch_changesets_incremental
@@ -95,9 +95,7 class RepositoryGitTest < ActiveSupport::TestCase
95 @repository.fetch_changesets
95 @repository.fetch_changesets
96 @project.reload
96 @project.reload
97 assert_equal NUM_REV, @repository.changesets.count
97 assert_equal NUM_REV, @repository.changesets.count
98 assert_equal 33, @repository.changes.count
99 extra_info_db = @repository.extra_info["branches"]
98 extra_info_db = @repository.extra_info["branches"]
100 assert_equal 4, extra_info_db.size
101 assert_equal "1ca7f5ed374f3cb31a93ae5215c2e25cc6ec5127",
99 assert_equal "1ca7f5ed374f3cb31a93ae5215c2e25cc6ec5127",
102 extra_info_db["latin-1-path-encoding"]["last_scmid"]
100 extra_info_db["latin-1-path-encoding"]["last_scmid"]
103 assert_equal "83ca5fd546063a3c7dc2e568ba3355661a9e2b2c",
101 assert_equal "83ca5fd546063a3c7dc2e568ba3355661a9e2b2c",
@@ -116,7 +114,7 class RepositoryGitTest < ActiveSupport::TestCase
116 end
114 end
117 @project.reload
115 @project.reload
118 cs1 = @repository.changesets
116 cs1 = @repository.changesets
119 assert_equal 15, cs1.count
117 assert_equal 22, cs1.count
120 h = @repository.extra_info.dup
118 h = @repository.extra_info.dup
121 h["branches"]["master"]["last_scmid"] =
119 h["branches"]["master"]["last_scmid"] =
122 "4a07fe31bffcf2888791f3e6cbc9c4545cefe3e8"
120 "4a07fe31bffcf2888791f3e6cbc9c4545cefe3e8"
@@ -138,7 +136,7 class RepositoryGitTest < ActiveSupport::TestCase
138 @project.reload
136 @project.reload
139 assert_equal NUM_REV, @repository.changesets.count
137 assert_equal NUM_REV, @repository.changesets.count
140 extra_info_db = @repository.extra_info["branches"]
138 extra_info_db = @repository.extra_info["branches"]
141 assert_equal 4, extra_info_db.size
139 assert_equal 5, extra_info_db.size
142 assert_equal "1ca7f5ed374f3cb31a93ae5215c2e25cc6ec5127",
140 assert_equal "1ca7f5ed374f3cb31a93ae5215c2e25cc6ec5127",
143 extra_info_db["latin-1-path-encoding"]["last_scmid"]
141 extra_info_db["latin-1-path-encoding"]["last_scmid"]
144 assert_equal "83ca5fd546063a3c7dc2e568ba3355661a9e2b2c",
142 assert_equal "83ca5fd546063a3c7dc2e568ba3355661a9e2b2c",
@@ -157,7 +155,7 class RepositoryGitTest < ActiveSupport::TestCase
157 end
155 end
158 @project.reload
156 @project.reload
159 cs1 = @repository.changesets
157 cs1 = @repository.changesets
160 assert_equal 15, cs1.count
158 assert_equal 22, cs1.count
161 h = @repository.extra_info.dup
159 h = @repository.extra_info.dup
162 h["branches"]["master"]["last_scmid"] =
160 h["branches"]["master"]["last_scmid"] =
163 "abcd1234efgh"
161 "abcd1234efgh"
@@ -170,7 +168,7 class RepositoryGitTest < ActiveSupport::TestCase
170
168
171 @repository.fetch_changesets
169 @repository.fetch_changesets
172 @project.reload
170 @project.reload
173 assert_equal 15, @repository.changesets.count
171 assert_equal 22, @repository.changesets.count
174 end
172 end
175
173
176 def test_parents
174 def test_parents
@@ -227,7 +225,7 class RepositoryGitTest < ActiveSupport::TestCase
227 end
225 end
228 @project.reload
226 @project.reload
229 cs1 = @repository.changesets
227 cs1 = @repository.changesets
230 assert_equal 15, cs1.count
228 assert_equal NUM_REV - 6, cs1.count
231 assert_equal 0, @repository.extra_info["db_consistent"]["ordering"]
229 assert_equal 0, @repository.extra_info["db_consistent"]["ordering"]
232 h = @repository.extra_info.dup
230 h = @repository.extra_info.dup
233 h["branches"]["master"]["last_scmid"] =
231 h["branches"]["master"]["last_scmid"] =
@@ -479,7 +477,7 class RepositoryGitTest < ActiveSupport::TestCase
479 @repository.fetch_changesets
477 @repository.fetch_changesets
480 @project.reload
478 @project.reload
481 assert_equal NUM_REV, @repository.changesets.count
479 assert_equal NUM_REV, @repository.changesets.count
482 %w|7234cb2750b63f47bff735edc50a1c0a433c2518 7234cb2|.each do |r1|
480 %w|95488a44bc25f7d1f97d775a31359539ff333a63 95488a44b|.each do |r1|
483 changeset = @repository.find_changeset_by_name(r1)
481 changeset = @repository.find_changeset_by_name(r1)
484 assert_nil changeset.previous
482 assert_nil changeset.previous
485 end
483 end
General Comments 0
You need to be logged in to leave comments. Login now