summaryrefslogtreecommitdiff
path: root/qa/qa/runtime/env.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-10-17 18:08:20 +0000
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2018-10-17 18:08:20 +0000
commitb6f2f738c73b1dfe66be61e1b37ca21fa698cf1c (patch)
treeb6b520d12c2051a6a1cdaa5741f48f6583e0cce8 /qa/qa/runtime/env.rb
parentab9cf561c230f1b6ec630215a9a9def53e14d764 (diff)
downloadgitlab-ce-b6f2f738c73b1dfe66be61e1b37ca21fa698cf1c.tar.gz
First iteration to allow creating QA resources using the API
Diffstat (limited to 'qa/qa/runtime/env.rb')
-rw-r--r--qa/qa/runtime/env.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/qa/qa/runtime/env.rb b/qa/qa/runtime/env.rb
index 4a2109799fa..533ed87453a 100644
--- a/qa/qa/runtime/env.rb
+++ b/qa/qa/runtime/env.rb
@@ -3,6 +3,12 @@ module QA
module Env
extend self
+ attr_writer :personal_access_token
+
+ def verbose?
+ enabled?(ENV['VERBOSE'], default: false)
+ end
+
# set to 'false' to have Chrome run visibly instead of headless
def chrome_headless?
enabled?(ENV['CHROME_HEADLESS'])
@@ -22,7 +28,7 @@ module QA
# specifies token that can be used for the api
def personal_access_token
- ENV['PERSONAL_ACCESS_TOKEN']
+ @personal_access_token ||= ENV['PERSONAL_ACCESS_TOKEN']
end
def user_username
@@ -42,7 +48,7 @@ module QA
end
def forker?
- forker_username && forker_password
+ !!(forker_username && forker_password)
end
def forker_username