debian-mirror-gitlab/scripts/setup-test-env

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
1.3 KiB
Text
Raw Permalink Normal View History

2021-09-30 23:02:18 +05:30
#!/usr/bin/env ruby
# frozen_string_literal: true
2021-11-11 11:23:49 +05:30
require_relative '../config/bundler_setup'
2021-09-30 23:02:18 +05:30
2023-05-27 22:25:52 +05:30
require_relative '../spec/rails_autoload'
2021-09-30 23:02:18 +05:30
require 'request_store'
require 'rake'
2023-05-27 22:25:52 +05:30
require 'active_support/all'
2021-09-30 23:02:18 +05:30
ENV['SKIP_RAILS_ENV_IN_RAKE'] = 'true'
load File.expand_path('../lib/tasks/gitlab/helpers.rake', __dir__)
load File.expand_path('../lib/tasks/gitlab/gitaly.rake', __dir__)
# Required for lib/system_check/helpers.rb
2023-05-27 22:25:52 +05:30
require_relative '../lib/gitlab/task_helpers'
2021-09-30 23:02:18 +05:30
# Required for lib/tasks/gitlab/helpers.rake
2023-05-27 22:25:52 +05:30
require_relative '../lib/system_check/helpers'
2021-09-30 23:02:18 +05:30
# Required for config/initializers/1_settings.rb
require 'omniauth'
require 'omniauth-github'
require 'etc'
2023-05-27 22:25:52 +05:30
require_relative '../lib/gitlab/access'
require_relative '../lib/gitlab/utils'
unless defined?(License)
# This is needed to allow use of `Gitlab::ImportSources.values` in `1_settings.rb`.
# See ee/lib/ee/gitlab/import_sources.rb
class License
def self.database
Struct.new(:cached_table_exists?).new(false)
end
end
end
2021-09-30 23:02:18 +05:30
2023-05-27 22:25:52 +05:30
require_relative '../config/initializers/1_settings'
2021-09-30 23:02:18 +05:30
Gitlab.ee do
load File.expand_path('../ee/lib/tasks/gitlab/indexer.rake', __dir__)
2023-05-27 22:25:52 +05:30
require_relative '../ee/lib/gitlab/elastic/indexer'
require_relative '../lib/gitlab/utils/override'
2021-09-30 23:02:18 +05:30
end
2023-05-27 22:25:52 +05:30
require_relative '../spec/support/helpers/test_env'
2021-09-30 23:02:18 +05:30
TestEnv.init