Skip to content
Snippets Groups Projects
Unverified Commit 4385ab06 authored by Rémy Coutable's avatar Rémy Coutable
Browse files

Rename Runtime::Env to Runtime::Settings


Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 7b353511
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -10,8 +10,8 @@ module Gitlab
end
 
module Runtime
autoload :Env, 'qa/runtime/env'
autoload :Scenario, 'qa/runtime/scenario'
autoload :Settings, 'qa/runtime/settings'
end
 
module Scenario
Loading
Loading
Loading
Loading
@@ -88,7 +88,7 @@ module Gitlab
command.volume(to, from, 'Z')
end
 
File.join(Runtime::Env.logs_dir, name).tap do |logs_dir|
File.join(Runtime::Settings.logs_dir, name).tap do |logs_dir|
command.volume(logs_dir, '/var/log/gitlab', 'Z')
end
 
Loading
Loading
Loading
Loading
@@ -150,8 +150,8 @@ module Gitlab
end
 
def set_gitlab_credentials
::Gitlab::QA::Runtime::Env.ldap_username = username
::Gitlab::QA::Runtime::Env.ldap_password = password
::Gitlab::QA::Runtime::Settings.ldap_username = username
::Gitlab::QA::Runtime::Settings.ldap_password = password
end
end
end
Loading
Loading
Loading
Loading
@@ -22,13 +22,13 @@ module Gitlab
@docker.run(release.qa_image, release.tag, suite, *args) do |command|
command << "-t --rm --net=#{network || 'bridge'}"
 
variables = Runtime::Env.variables
variables = Runtime::Settings.variables
variables.each do |key, value|
command.env(key, value)
end
 
command.volume('/var/run/docker.sock', '/var/run/docker.sock')
command.volume(Runtime::Env.screenshots_dir, '/home/qa/tmp')
command.volume(Runtime::Settings.screenshots_dir, '/home/qa/tmp')
command.name("gitlab-specs-#{Time.now.to_i}")
end
end
Loading
Loading
Loading
Loading
@@ -50,10 +50,10 @@ module Gitlab
private
 
def request
Runtime::Env.require_qa_access_token!
Runtime::Settings.require_qa_access_token!
 
@request ||= Net::HTTP::Get.new(@uri.path).tap do |req|
req['PRIVATE-TOKEN'] = Runtime::Env.qa_access_token
req['PRIVATE-TOKEN'] = Runtime::Settings.qa_access_token
end
end
end
Loading
Loading
module Gitlab
module QA
module Runtime
module Env
module Settings
extend self
 
ENV_VARIABLES = {
Loading
Loading
Loading
Loading
@@ -10,7 +10,7 @@ module Gitlab
include Template
 
def perform(options)
Runtime::Env.require_no_license!
Runtime::Settings.require_no_license!
 
release = Component::Staging.release
 
Loading
Loading
Loading
Loading
@@ -16,7 +16,7 @@ module Gitlab
 
raise ArgumentError, 'Geo is EE only!' unless release.ee?
 
Runtime::Env.require_license!
Runtime::Settings.require_license!
 
Component::Gitlab.perform do |primary|
primary.release = release
Loading
Loading
Loading
Loading
@@ -120,7 +120,7 @@ describe Gitlab::QA::Component::Gitlab do
end
 
it 'bind-mounds volume with logs in an appropriate directory' do
allow(Gitlab::QA::Runtime::Env)
allow(Gitlab::QA::Runtime::Settings)
.to receive(:logs_dir)
.and_return('/tmp/gitlab-qa/logs')
 
Loading
Loading
describe Gitlab::QA::Runtime::Env do
describe Gitlab::QA::Runtime::Settings do
describe '.screenshots_dir' do
context 'when there is an env variable set' do
before do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment