Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Skip some subversion specs if svnadmin unavailable

Christophe Bliard4bc9c607c20a
diff --git a/spec/support/scm/relocate_repository.rb b/spec/support/scm/relocate_repository.rb
index b65d7b96f91..eb16bf42f4d 100644
--- a/spec/support/scm/relocate_repository.rb
+++ b/spec/support/scm/relocate_repository.rb
@@ -19,7 +19,9 @@ RSpec.shared_examples_for 'repository can be relocated' do |vendor|
allow(Repository).to receive(:find).and_return(repository)
end
- context 'with managed local config' do
+ needed_command = 'svnadmin' if vendor == :subversion
+
+ context 'with managed local config', skip_if_command_unavailable: needed_command do
include_context 'with tmpdir'
let(:config) { { manages: File.join(tmpdir, 'myrepos') } }
diff --git a/spec/workers/scm/create_local_repository_job_spec.rb b/spec/workers/scm/create_local_repository_job_spec.rb
index 4277aef4d23..2616eb27bee 100644
--- a/spec/workers/scm/create_local_repository_job_spec.rb
+++ b/spec/workers/scm/create_local_repository_job_spec.rb
@@ -44,7 +44,7 @@ RSpec.describe SCM::CreateLocalRepositoryJob do
allow(OpenProject::Configuration).to receive(:[]).with('scm').and_return(config)
end
- describe 'with a managed repository' do
+ describe 'with a managed repository', skip_if_command_unavailable: 'svnadmin' do
include_context 'with tmpdir'
let(:project) { build(:project) }