summaryrefslogtreecommitdiff
path: root/qa/qa/specs/features/api/4_verify/pipeline_deletion_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/specs/features/api/4_verify/pipeline_deletion_spec.rb')
-rw-r--r--qa/qa/specs/features/api/4_verify/pipeline_deletion_spec.rb20
1 files changed, 15 insertions, 5 deletions
diff --git a/qa/qa/specs/features/api/4_verify/pipeline_deletion_spec.rb b/qa/qa/specs/features/api/4_verify/pipeline_deletion_spec.rb
index 567815858f3..0bbb0ed897a 100644
--- a/qa/qa/specs/features/api/4_verify/pipeline_deletion_spec.rb
+++ b/qa/qa/specs/features/api/4_verify/pipeline_deletion_spec.rb
@@ -49,9 +49,7 @@ module QA
let(:pipeline_data_request) { Runtime::API::Request.new(api_client, "/projects/#{project.id}/pipelines/#{pipeline_id}") }
before do
- Support::Waiter.wait_until(max_duration: 30, sleep_interval: 3) do
- JSON.parse(get(pipeline_data_request.url))['status'] != 'pending'
- end
+ Support::Waiter.wait_until(sleep_interval: 3) { !pipeline.empty? && pipeline['status'] != 'pending' }
end
after do
@@ -59,11 +57,23 @@ module QA
end
context 'when deleted via API' do
- it 'is not found' do
+ it 'is not found', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/931' do
delete(pipeline_data_request.url)
- expect(JSON.parse(get(pipeline_data_request.url))['message'].downcase).to have_content('404 not found')
+
+ deleted_pipeline = nil
+ Support::Waiter.wait_until(sleep_interval: 3) do
+ deleted_pipeline = pipeline
+ !pipeline.empty?
+ end
+ expect(deleted_pipeline['message'].downcase).to have_content('404 not found')
end
end
+
+ private
+
+ def pipeline
+ JSON.parse(get(pipeline_data_request.url))
+ end
end
end
end