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
0c200a13
Commit
0c200a13
authored
Mar 08, 2021
by
Tiffany Rea
Committed by
Sanad Liaquat
Mar 08, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete redundant test
parent
ed9cf147
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
82 deletions
+0
-82
qa/qa/specs/features/api/4_verify/.gitkeep
qa/qa/specs/features/api/4_verify/.gitkeep
+0
-0
qa/qa/specs/features/api/4_verify/pipeline_deletion_spec.rb
qa/qa/specs/features/api/4_verify/pipeline_deletion_spec.rb
+0
-82
No files found.
qa/qa/specs/features/api/4_verify/.gitkeep
0 → 100644
View file @
0c200a13
qa/qa/specs/features/api/4_verify/pipeline_deletion_spec.rb
deleted
100644 → 0
View file @
ed9cf147
# frozen_string_literal: true
module
QA
RSpec
.
describe
'Verify'
do
include
Support
::
Api
let
(
:api_client
)
{
Runtime
::
API
::
Client
.
new
(
:gitlab
)
}
describe
'Pipeline'
,
:runner
do
let
(
:project
)
do
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
project
.
name
=
'project-with-pipeline'
end
end
let!
(
:runner
)
do
Resource
::
Runner
.
fabricate!
do
|
runner
|
runner
.
project
=
project
runner
.
name
=
project
.
name
runner
.
tags
=
[
project
.
name
]
end
end
let!
(
:ci_file
)
do
Resource
::
Repository
::
Commit
.
fabricate_via_api!
do
|
commit
|
commit
.
project
=
project
commit
.
commit_message
=
'Add .gitlab-ci.yml'
commit
.
add_files
(
[
{
file_path:
'.gitlab-ci.yml'
,
content:
<<~
YAML
job1:
tags:
-
#{
project
.
name
}
script: echo 'OK'
YAML
}
]
)
end
end
let!
(
:pipeline_id
)
do
pipeline_create_request
=
Runtime
::
API
::
Request
.
new
(
api_client
,
"/projects/
#{
project
.
id
}
/pipeline?ref=
#{
project
.
default_branch
}
"
)
JSON
.
parse
(
post
(
pipeline_create_request
.
url
,
nil
))[
'id'
]
end
let
(
:pipeline_data_request
)
{
Runtime
::
API
::
Request
.
new
(
api_client
,
"/projects/
#{
project
.
id
}
/pipelines/
#{
pipeline_id
}
"
)
}
before
do
Support
::
Waiter
.
wait_until
(
sleep_interval:
3
)
{
!
pipeline
.
empty?
&&
pipeline
[
'status'
]
!=
'pending'
}
end
after
do
runner
.
remove_via_api!
end
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
)
deleted_pipeline
=
nil
Support
::
Waiter
.
wait_until
(
sleep_interval:
3
)
do
deleted_pipeline
=
pipeline
!
pipeline
.
empty?
end
raise
"Pipeline response does not have a 'message' key:
#{
deleted_pipeline
}
"
unless
deleted_pipeline
&
.
key?
(
'message'
)
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