Commit 355aa02d authored by Sanad Liaquat's avatar Sanad Liaquat

Merge branch 'qa-reuse-chrome-profile' into 'master'

Add QA option to use the same Chrome profile

Closes #52255

See merge request gitlab-org/gitlab-ce!23576
parents f6d8fb6e 15fecbc4
...@@ -70,6 +70,13 @@ module QA ...@@ -70,6 +70,13 @@ module QA
options.add_argument("disable-gpu") options.add_argument("disable-gpu")
end end
# Use the same profile on QA runs if CHROME_REUSE_PROFILE is true.
# Useful to speed up local QA.
if QA::Runtime::Env.reuse_chrome_profile?
qa_profile_dir = ::File.expand_path('../../tmp/qa-profile', __dir__)
options.add_argument("user-data-dir=#{qa_profile_dir}")
end
# Disable /dev/shm use in CI. See https://gitlab.com/gitlab-org/gitlab-ee/issues/4252 # Disable /dev/shm use in CI. See https://gitlab.com/gitlab-org/gitlab-ee/issues/4252
options.add_argument("disable-dev-shm-usage") if QA::Runtime::Env.running_in_ci? options.add_argument("disable-dev-shm-usage") if QA::Runtime::Env.running_in_ci?
......
...@@ -30,6 +30,11 @@ module QA ...@@ -30,6 +30,11 @@ module QA
enabled?(ENV['CHROME_HEADLESS']) enabled?(ENV['CHROME_HEADLESS'])
end end
# set to 'true' to have Chrome use a fixed profile directory
def reuse_chrome_profile?
enabled?(ENV['CHROME_REUSE_PROFILE'], default: false)
end
def accept_insecure_certs? def accept_insecure_certs?
enabled?(ENV['ACCEPT_INSECURE_CERTS']) enabled?(ENV['ACCEPT_INSECURE_CERTS'])
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment