2022-01-01 13:38:12 +00:00
|
|
|
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
|
2021-06-01 12:20:20 +00:00
|
|
|
|
2018-10-01 17:41:17 +00:00
|
|
|
namespace :zammad do
|
|
|
|
|
|
|
|
namespace :ci do
|
|
|
|
|
|
|
|
desc 'Sets all required Settings for performing tests in the CI environment'
|
|
|
|
task :settings, [:elasticsearch] => :environment do |_task, args|
|
|
|
|
Setting.set('developer_mode', true)
|
|
|
|
Setting.set('chat_agent_idle_timeout', '45')
|
|
|
|
|
|
|
|
next if args[:elasticsearch] != 'with_elasticsearch'
|
|
|
|
|
2018-12-14 19:19:46 +00:00
|
|
|
Setting.set('es_url', 'http://elasticsearch:9200')
|
2018-10-01 17:41:17 +00:00
|
|
|
Setting.set('es_index', "browser_test_#{ENV['CI_BUILD_ID']}")
|
|
|
|
|
|
|
|
Rake::Task['searchindex:rebuild'].invoke
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|