E2E framework use token for git operations
What does this MR do and why?
E2E framework use token for git operations
As per https://gitlab.com/gitlab-org/gitlab/-/work_items/582725
References
https://gitlab.com/gitlab-org/gitlab/-/work_items/582725
How to set up and validate locally
Ensure you have access to Staging Elastic search for logs
eg.
Staging Search - replace your_ip
Baseline
- From
masteror any other branch that does not have this MRs changes run up
You might need to force SSH off (I suspect it was using the SSH keys of my local installed git executable so wasn't showing up in logs)
Update qa/qa/git/repository.rb
def ssh_key_set?
return false
- Run a previously identified affected test - you might need to run it several times (eg. 10 to make sure log entries show), I run this one as it's a relatively fast E2E spec.
GITLAB_QA_USER_AGENT =<USER_AGENT> GITLAB_ADMIN_USERNAME=<ADMIN_USERNAME> GITLAB_ADMIN_PASSWORD="<ADMIN_PASSWORD>" GITLAB_USERNAME=<USERNAME> GITLAB_QA_ACCESS_TOKEN="<ACCESS_TOKEN>" GITLAB_PASSWORD="<GITLAB_PASSWORD>" QA_DEBUG=true WEBDRIVER_HEADLESS=true bundle exec bin/qa Test::Instance::All https://staging.gitlab.com -- qa/specs/features/api/3_create/merge_request/push_options_spec.rb
- Observe log entries eg.
Changes
- Bring down the changes in this MR
Force SSH off if needed again
Update qa/qa/git/repository.rb
def ssh_key_set?
return false
- Run the test - again run it several times (eg. 10 to make sure log entries don't show)
GITLAB_QA_USER_AGENT =<USER_AGENT> GITLAB_ADMIN_USERNAME=<ADMIN_USERNAME> GITLAB_ADMIN_PASSWORD="<ADMIN_PASSWORD>" GITLAB_USERNAME=<USERNAME> GITLAB_QA_ACCESS_TOKEN="<ACCESS_TOKEN>" GITLAB_PASSWORD="<GITLAB_PASSWORD>" QA_DEBUG=true WEBDRIVER_HEADLESS=true bundle exec bin/qa Test::Instance::All https://staging.gitlab.com -- qa/specs/features/api/3_create/merge_request/push_options_spec.rb
- Refresh the Elastic log dashboard, no new entries should appear
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Will Meek
