From 02bc406bfdb13629ccd58fd1e52db1ec85abec1b Mon Sep 17 00:00:00 2001 From: Mark Lapierre Date: Thu, 27 Dec 2018 06:47:06 -0500 Subject: [PATCH] Add personal access token env var --- docs/what_tests_can_be_run.md | 3 ++- lib/gitlab/qa/runtime/env.rb | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/what_tests_can_be_run.md b/docs/what_tests_can_be_run.md index 778c10dd..8e1c39d0 100644 --- a/docs/what_tests_can_be_run.md +++ b/docs/what_tests_can_be_run.md @@ -50,6 +50,7 @@ For more details on the internals, please read the * `QA_DEBUG` - set to `true` to verbosely log page object actions. Note: if enabled be aware that sensitive data might be logged. If an input element has a QA selector with `password` in the name, data entered into the input element will be masked. If the element doesn't have `password` in its name it won't be masked. * `QA_LOG_PATH` - path to output debug logging to. If not set logging will be output to STDOUT * `QA_CAN_TEST_GIT_PROTOCOL_V2` - set to `false` to skip tests that require Git protocol v2 if your environment doesn't support it. +* `PERSONAL_ACCESS_TOKEN` - a [personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) with `api` scope to allow API access and avoid the tests having to create a new one. ### `Test::Instance::Image CE|EE|` @@ -192,7 +193,7 @@ $ gitlab-qa Test::Integration::LDAPNoTLS EE ### `Test::Integration::LDAPTLS CE|EE|` -This tests that a TLS enabled GitLab instance works as expected with an external TLS enabled LDAP server. +This tests that a TLS enabled GitLab instance works as expected with an external TLS enabled LDAP server. The self signed TLS certificate used for the Gitlab instance and the private key is located at: [`gitlab-org/gitlab-qa@tls_certificates/gitlab`][test-integration-ldap-tls-certs] The certificate was generated with openssl using this command: diff --git a/lib/gitlab/qa/runtime/env.rb b/lib/gitlab/qa/runtime/env.rb index a1e7c01c..022c4a73 100644 --- a/lib/gitlab/qa/runtime/env.rb +++ b/lib/gitlab/qa/runtime/env.rb @@ -35,7 +35,8 @@ module Gitlab 'GITLAB_QA_USERNAME_1' => :gitlab_qa_username_1, 'GITLAB_QA_PASSWORD_1' => :gitlab_qa_password_1, 'GITLAB_QA_USERNAME_2' => :gitlab_qa_username_2, - 'GITLAB_QA_PASSWORD_2' => :gitlab_qa_password_2 + 'GITLAB_QA_PASSWORD_2' => :gitlab_qa_password_2, + 'PERSONAL_ACCESS_TOKEN' => :personal_access_token }.freeze ENV_VARIABLES.each_value do |accessor| -- GitLab