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
e27f37e0
Commit
e27f37e0
authored
Jul 15, 2020
by
Tiffany Rea
Committed by
Sanad Liaquat
Jul 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
E2E test delete pipeline via API
parent
f6a5eae4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
0 deletions
+63
-0
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
+63
-0
No files found.
qa/qa/specs/features/api/4_verify/.gitkeep
deleted
100644 → 0
View file @
f6a5eae4
qa/qa/specs/features/api/4_verify/pipeline_deletion_spec.rb
0 → 100644
View file @
e27f37e0
# 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=master"
)
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
}
"
)
}
after
do
runner
.
remove_via_api!
end
context
'when deleted via API'
do
it
'is not found'
do
delete
(
pipeline_data_request
.
url
)
expect
(
JSON
.
parse
(
get
(
pipeline_data_request
.
url
))[
'message'
].
downcase
).
to
have_content
(
'404 not found'
)
end
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