diff options
author | Sanad Liaquat <sliaquat@gitlab.com> | 2019-09-12 06:09:57 +0000 |
---|---|---|
committer | Sanad Liaquat <sliaquat@gitlab.com> | 2019-09-12 06:09:57 +0000 |
commit | 3de934cb4f9c7f8efaba76b8e78b7221d8807aa7 (patch) | |
tree | af6a541aec6846060075b00a7eafabe1f9bf4ada | |
parent | 80e9f7f3463cc67c6eb1dd22fb9e2dc88ebed3f1 (diff) | |
parent | eab7fa1a9f22f91e8fec4533961597a5ce59dc57 (diff) | |
download | gitlab-ce-3de934cb4f9c7f8efaba76b8e78b7221d8807aa7.tar.gz |
Merge branch 'qa-ml-fix-nplus-pipeline' into 'master'
Fix failing E2E N+1 pipelines
See merge request gitlab-org/gitlab-ce!32913
-rw-r--r-- | qa/qa/runtime/api/client.rb | 9 | ||||
-rw-r--r-- | qa/qa/specs/features/api/3_create/repository/project_archive_compare_spec.rb | 3 |
2 files changed, 9 insertions, 3 deletions
diff --git a/qa/qa/runtime/api/client.rb b/qa/qa/runtime/api/client.rb index 25d8f3c0fbb..594913c757a 100644 --- a/qa/qa/runtime/api/client.rb +++ b/qa/qa/runtime/api/client.rb @@ -53,7 +53,14 @@ module QA Page::Main::Login.perform { |login| login.sign_in_using_credentials(@user) } end - Resource::PersonalAccessToken.fabricate!.access_token + token = Resource::PersonalAccessToken.fabricate!.access_token + + # If this is a new session, that tests that follow could fail if they + # try to sign in without starting a new session + # Sign out so the tests can successfully sign in + Page::Main::Menu.perform(&:sign_out) if @is_new_session + + token end end end diff --git a/qa/qa/specs/features/api/3_create/repository/project_archive_compare_spec.rb b/qa/qa/specs/features/api/3_create/repository/project_archive_compare_spec.rb index 3fe04e8b835..ce8425cb3d1 100644 --- a/qa/qa/specs/features/api/3_create/repository/project_archive_compare_spec.rb +++ b/qa/qa/specs/features/api/3_create/repository/project_archive_compare_spec.rb @@ -21,7 +21,6 @@ module QA user_info[:api_client] = Runtime::API::Client.new(:gitlab, user: user_info[:user]) user_info[:api_client].personal_access_token user_info[:project] = create_project(user_info[:user], user_info[:api_client], @project_name) - Page::Main::Menu.perform(&:sign_out) end end @@ -43,7 +42,7 @@ module QA end def create_project(user, api_client, project_name) - project = Resource::Project.fabricate! do |project| + project = Resource::Project.fabricate_via_api! do |project| project.standalone = true project.add_name_uuid = false project.name = project_name |