Skip repository tests when the SCM client command is unavailable (#42500).

Patch by Go MAEDA (user:maeda).


git-svn-id: https://svn.redmine.org/redmine/trunk@23618 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2025-04-10 09:42:10 +00:00
parent 2bc72f1823
commit 1e9f1229e6
17 changed files with 21 additions and 13 deletions

View File

@@ -42,13 +42,6 @@ class GitAdapterTest < ActiveSupport::TestCase
WINDOWS_SKIP_STR = "TODO: This test fails in Git for Windows above 1.7.10"
def setup
adapter_class = Redmine::Scm::Adapters::GitAdapter
assert adapter_class
assert adapter_class.client_command
assert_equal true, adapter_class.client_available
assert_equal true, adapter_class.client_version_above?([1])
assert_equal true, adapter_class.client_version_above?([1, 0])
@adapter =
Redmine::Scm::Adapters::GitAdapter.
new(
@@ -59,6 +52,8 @@ class GitAdapterTest < ActiveSupport::TestCase
'ISO-8859-1'
)
assert @adapter
skip "SCM is unavailable" unless @adapter.class.client_available
@char_1 = 'Ü'
@str_felix_hex = "Felix Sch\xC3\xA4fer".b
end