Commit db76070a authored by Sanad Liaquat's avatar Sanad Liaquat

Merge branch 'gy-qa-job-log-workaround' into 'master'

Workaround for QA tests when job_log_json flag is enabled

Closes #34901, #34900, and #34899

See merge request gitlab-org/gitlab!19145
parents af01e758 478416e4
...@@ -5,7 +5,15 @@ require 'digest/sha1' ...@@ -5,7 +5,15 @@ require 'digest/sha1'
module QA module QA
context 'Release', :docker do context 'Release', :docker do
describe 'Git clone using a deploy key' do describe 'Git clone using a deploy key' do
after do
Runtime::Feature.enable('job_log_json') if @job_log_json_flag_enabled
end
before do before do
# Handle WIP Job Logs flag - https://gitlab.com/gitlab-org/gitlab/issues/31162
@job_log_json_flag_enabled = Runtime::Feature.enabled?('job_log_json')
Runtime::Feature.disable('job_log_json') if @job_log_json_flag_enabled
Runtime::Browser.visit(:gitlab, Page::Main::Login) Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.perform(&:sign_in_using_credentials) Page::Main::Login.perform(&:sign_in_using_credentials)
......
...@@ -13,11 +13,17 @@ module QA ...@@ -13,11 +13,17 @@ module QA
after do after do
Service::DockerRun::GitlabRunner.new(@executor).remove! Service::DockerRun::GitlabRunner.new(@executor).remove!
Runtime::Feature.enable('job_log_json') if @job_log_json_flag_enabled
end end
before do before do
@executor = "qa-runner-#{Time.now.to_i}" @executor = "qa-runner-#{Time.now.to_i}"
# Handle WIP Job Logs flag - https://gitlab.com/gitlab-org/gitlab/issues/31162
@job_log_json_flag_enabled = Runtime::Feature.enabled?('job_log_json')
Runtime::Feature.disable('job_log_json') if @job_log_json_flag_enabled
Runtime::Browser.visit(:gitlab, Page::Main::Login) Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.perform(&:sign_in_using_credentials) Page::Main::Login.perform(&:sign_in_using_credentials)
......
...@@ -19,11 +19,17 @@ module QA ...@@ -19,11 +19,17 @@ module QA
describe 'Security Reports' do describe 'Security Reports' do
after do after do
Service::DockerRun::GitlabRunner.new(@executor).remove! Service::DockerRun::GitlabRunner.new(@executor).remove!
Runtime::Feature.enable('job_log_json') if @job_log_json_flag_enabled
end end
before do before do
@executor = "qa-runner-#{Time.now.to_i}" @executor = "qa-runner-#{Time.now.to_i}"
# Handle WIP Job Logs flag - https://gitlab.com/gitlab-org/gitlab/issues/31162
@job_log_json_flag_enabled = Runtime::Feature.enabled?('job_log_json')
Runtime::Feature.disable('job_log_json') if @job_log_json_flag_enabled
Runtime::Browser.visit(:gitlab, Page::Main::Login) Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.perform(&:sign_in_using_credentials) Page::Main::Login.perform(&:sign_in_using_credentials)
......
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