diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-10-03 15:40:23 +0200 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-10-03 15:40:23 +0200 |
commit | ac6e787c597b7f4604b3ec75853ffeda65fa1329 (patch) | |
tree | 51290ca975d162fac11dde7d3baf7660da31cb7a | |
parent | b8e47d72637167be5a225fe20b5f893c43b9a885 (diff) | |
download | gitlab-ce-ac6e787c597b7f4604b3ec75853ffeda65fa1329.tar.gz |
Allow overriding the Chrome binary used via CHROME_BINARY env variable
-rw-r--r-- | qa/README.md | 8 | ||||
-rw-r--r-- | qa/qa/specs/config.rb | 8 |
2 files changed, 15 insertions, 1 deletions
diff --git a/qa/README.md b/qa/README.md index e0ebb53a2e9..4cc0955a238 100644 --- a/qa/README.md +++ b/qa/README.md @@ -34,4 +34,12 @@ test the EE license specs, you can run: EE_LICENSE="<YOUR LICENSE KEY>" GITLAB_USERNAME='root' GITLAB_PASSWORD='5iveL!fe' bin/qa Test::Instance http://localhost qa/ee ``` +By default tests will run via headless Google Chrome using +`/usr/bin/google-chrome-stable`. You can override this path using the +`CHROME_BINARY` environment variable: + +``` +CHROME_BINARY=/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome bin/qa Test::Instance http://localhost +``` + All [supported environment variables are here](https://gitlab.com/gitlab-org/gitlab-qa#supported-environment-variables). diff --git a/qa/qa/specs/config.rb b/qa/qa/specs/config.rb index 4dfdd6cd93c..44d49ad10dc 100644 --- a/qa/qa/specs/config.rb +++ b/qa/qa/specs/config.rb @@ -43,7 +43,7 @@ module QA Capybara.register_driver :chrome do |app| capabilities = Selenium::WebDriver::Remote::Capabilities.chrome( 'chromeOptions' => { - 'binary' => '/usr/bin/google-chrome-stable', + 'binary' => chrome_binary, 'args' => %w[headless no-sandbox disable-gpu window-size=1280,1024] } ) @@ -66,6 +66,12 @@ module QA config.save_path = 'tmp' end end + + private + + def chrome_binary + ENV['CHROME_BINARY'] || '/usr/bin/google-chrome-stable' + end end end end |