Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
3af0f6e6
Commit
3af0f6e6
authored
Sep 15, 2020
by
Tiffany Rea
Committed by
Dan Davison
Sep 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid checking when response is empty
parent
d48d68e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
qa/qa/specs/features/api/4_verify/pipeline_deletion_spec.rb
qa/qa/specs/features/api/4_verify/pipeline_deletion_spec.rb
+14
-4
No files found.
qa/qa/specs/features/api/4_verify/pipeline_deletion_spec.rb
View file @
3af0f6e6
...
...
@@ -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
...
...
@@ -61,9 +59,21 @@ module QA
context
'when deleted via API'
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment