Patch #42500 » skip-repository-tests-when-scm-unavailable.patch
test/functional/repositories_bazaar_controller_test.rb | ||
---|---|---|
37 | 37 |
:log_encoding => 'UTF-8' |
38 | 38 |
) |
39 | 39 |
assert @repository |
40 |
skip "SCM command is unavailable" unless @repository.class.scm_available |
|
40 | 41 |
end |
41 | 42 | |
42 | 43 |
if File.directory?(REPOSITORY_PATH) |
test/functional/repositories_controller_test.rb | ||
---|---|---|
186 | 186 | |
187 | 187 |
def test_show_without_main_repository_should_display_first_repository |
188 | 188 |
skip unless repository_configured?('subversion') |
189 |
skip unless Repository::Subversion.scm_available |
|
189 | 190 | |
190 | 191 |
project = Project.find(1) |
191 | 192 |
repos = project.repositories |
... | ... | |
208 | 209 | |
209 | 210 |
def test_show_should_show_diff_button_depending_on_browse_repository_permission |
210 | 211 |
skip unless repository_configured?('subversion') |
212 |
skip unless Repository::Subversion.scm_available |
|
211 | 213 | |
212 | 214 |
@request.session[:user_id] = 2 |
213 | 215 |
role = Role.find(1) |
test/functional/repositories_cvs_controller_test.rb | ||
---|---|---|
40 | 40 |
:url => MODULE_NAME, |
41 | 41 |
:log_encoding => 'UTF-8') |
42 | 42 |
assert @repository |
43 |
skip "SCM command is unavailable" unless @repository.class.scm_available |
|
43 | 44 |
end |
44 | 45 | |
45 | 46 |
if File.directory?(REPOSITORY_PATH) |
test/functional/repositories_git_controller_test.rb | ||
---|---|---|
41 | 41 |
:path_encoding => 'ISO-8859-1' |
42 | 42 |
) |
43 | 43 |
assert @repository |
44 |
skip "SCM command is unavailable" unless @repository.class.scm_available |
|
44 | 45 |
end |
45 | 46 | |
46 | 47 |
def test_create_and_update |
test/functional/repositories_mercurial_controller_test.rb | ||
---|---|---|
37 | 37 |
:path_encoding => 'ISO-8859-1' |
38 | 38 |
) |
39 | 39 |
assert @repository |
40 |
skip "SCM command is unavailable" unless @repository.class.scm_available |
|
41 | ||
40 | 42 |
@diff_c_support = true |
41 | 43 |
end |
42 | 44 |
test/functional/repositories_subversion_controller_test.rb | ||
---|---|---|
34 | 34 |
@repository = Repository::Subversion.create(:project => @project, |
35 | 35 |
:url => self.class.subversion_repository_url) |
36 | 36 |
assert @repository |
37 |
skip "SCM command is unavailable" unless @repository.class.scm_available |
|
37 | 38 |
end |
38 | 39 | |
39 | 40 |
if repository_configured?('subversion') |
test/integration/repositories_git_test.rb | ||
---|---|---|
35 | 35 |
:path_encoding => 'ISO-8859-1' |
36 | 36 |
) |
37 | 37 |
assert @repository |
38 |
skip "SCM command is unavailable" unless @repository.class.scm_available |
|
38 | 39 |
end |
39 | 40 | |
40 | 41 |
if File.directory?(REPOSITORY_PATH) |
test/unit/lib/redmine/scm/adapters/bazaar_adapter_test.rb | ||
---|---|---|
27 | 27 |
def setup |
28 | 28 |
@adapter = Redmine::Scm::Adapters::BazaarAdapter. |
29 | 29 |
new(File.join(REPOSITORY_PATH, "trunk")) |
30 |
skip "SCM command is unavailable" unless @adapter.class.client_available |
|
30 | 31 |
end |
31 | 32 | |
32 | 33 |
def test_scm_version |
test/unit/lib/redmine/scm/adapters/cvs_adapter_test.rb | ||
---|---|---|
27 | 27 |
if File.directory?(REPOSITORY_PATH) |
28 | 28 |
def setup |
29 | 29 |
@adapter = Redmine::Scm::Adapters::CvsAdapter.new(MODULE_NAME, REPOSITORY_PATH) |
30 |
skip "SCM command is unavailable" unless @adapter.class.client_available |
|
30 | 31 |
end |
31 | 32 | |
32 | 33 |
def test_scm_version |
test/unit/lib/redmine/scm/adapters/git_adapter_test.rb | ||
---|---|---|
42 | 42 |
WINDOWS_SKIP_STR = "TODO: This test fails in Git for Windows above 1.7.10" |
43 | 43 | |
44 | 44 |
def setup |
45 |
adapter_class = Redmine::Scm::Adapters::GitAdapter |
|
46 |
assert adapter_class |
|
47 |
assert adapter_class.client_command |
|
48 |
assert_equal true, adapter_class.client_available |
|
49 |
assert_equal true, adapter_class.client_version_above?([1]) |
|
50 |
assert_equal true, adapter_class.client_version_above?([1, 0]) |
|
51 | ||
52 | 45 |
@adapter = |
53 | 46 |
Redmine::Scm::Adapters::GitAdapter. |
54 | 47 |
new( |
... | ... | |
59 | 52 |
'ISO-8859-1' |
60 | 53 |
) |
61 | 54 |
assert @adapter |
55 |
skip "SCM is unavailable" unless @adapter.class.client_available |
|
56 | ||
62 | 57 |
@char_1 = 'Ü' |
63 | 58 |
@str_felix_hex = "Felix Sch\xC3\xA4fer".b |
64 | 59 |
end |
test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb | ||
---|---|---|
30 | 30 | |
31 | 31 |
if File.directory?(REPOSITORY_PATH) |
32 | 32 |
def setup |
33 |
adapter_class = Redmine::Scm::Adapters::MercurialAdapter |
|
34 |
assert adapter_class |
|
35 |
assert adapter_class.client_command |
|
36 |
assert_equal true, adapter_class.client_available |
|
37 |
assert_equal true, adapter_class.client_version_above?([0, 9, 5]) |
|
38 | ||
39 | 33 |
@adapter = |
40 | 34 |
Redmine::Scm::Adapters::MercurialAdapter.new( |
41 | 35 |
REPOSITORY_PATH, |
... | ... | |
44 | 38 |
nil, |
45 | 39 |
'ISO-8859-1' |
46 | 40 |
) |
41 |
skip "SCM command is unavailable" unless @adapter.class.client_available |
|
42 | ||
47 | 43 |
@diff_c_support = true |
48 | 44 |
@char_1 = 'Ü' |
49 | 45 |
@tag_char_1 = 'tag-Ü-00' |
test/unit/lib/redmine/scm/adapters/subversion_adapter_test.rb | ||
---|---|---|
23 | 23 |
if repository_configured?('subversion') |
24 | 24 |
def setup |
25 | 25 |
@adapter = Redmine::Scm::Adapters::SubversionAdapter.new(self.class.subversion_repository_url) |
26 |
skip "SCM command is unavailable" unless @adapter.class.client_available |
|
26 | 27 |
end |
27 | 28 | |
28 | 29 |
def test_client_version |
test/unit/repository_bazaar_test.rb | ||
---|---|---|
50 | 50 |
:log_encoding => 'UTF-8' |
51 | 51 |
) |
52 | 52 |
assert @repository |
53 |
skip "SCM command is unavailable" unless @repository.class.scm_available |
|
53 | 54 |
end |
54 | 55 | |
55 | 56 |
def test_blank_path_to_repository_error_message |
test/unit/repository_cvs_test.rb | ||
---|---|---|
36 | 36 |
:url => MODULE_NAME, |
37 | 37 |
:log_encoding => 'UTF-8') |
38 | 38 |
assert @repository |
39 |
skip "SCM command is unavailable" unless @repository.class.scm_available |
|
39 | 40 |
end |
40 | 41 | |
41 | 42 |
def test_blank_module_error_message |
test/unit/repository_git_test.rb | ||
---|---|---|
41 | 41 |
:path_encoding => 'ISO-8859-1' |
42 | 42 |
) |
43 | 43 |
assert @repository |
44 |
skip "SCM command is unavailable" unless @repository.class.scm_available |
|
44 | 45 |
end |
45 | 46 | |
46 | 47 |
def test_nondefault_repo_with_blank_identifier_destruction |
test/unit/repository_mercurial_test.rb | ||
---|---|---|
35 | 35 |
:path_encoding => 'ISO-8859-1' |
36 | 36 |
) |
37 | 37 |
assert @repository |
38 |
skip "SCM command is unavailable" unless @repository.class.scm_available |
|
38 | 39 |
end |
39 | 40 | |
40 | 41 |
def test_blank_path_to_repository_error_message |
test/unit/repository_subversion_test.rb | ||
---|---|---|
30 | 30 |
@repository = Repository::Subversion.create(:project => @project, |
31 | 31 |
:url => self.class.subversion_repository_url) |
32 | 32 |
assert @repository |
33 |
skip "SCM command is unavailable" unless @repository.class.scm_available |
|
33 | 34 |
end |
34 | 35 | |
35 | 36 |
def test_invalid_url |