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
e2105b0b
Commit
e2105b0b
authored
Jan 05, 2018
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve spec/controllers/projects/artifacts_controller_spec.rb
parent
8bac0bbb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
33 deletions
+0
-33
spec/controllers/projects/artifacts_controller_spec.rb
spec/controllers/projects/artifacts_controller_spec.rb
+0
-33
No files found.
spec/controllers/projects/artifacts_controller_spec.rb
View file @
e2105b0b
...
...
@@ -115,7 +115,6 @@ describe Projects::ArtifactsController do
context
'when the file exists'
do
let
(
:path
)
{
'ci_artifacts.txt'
}
<<<<<<<
HEAD
shared_examples
'a valid file'
do
it
'serves the file using workhorse'
do
...
...
@@ -143,42 +142,12 @@ describe Projects::ArtifactsController do
end
end
=======
shared_examples
'a valid file'
do
it
'serves the file using workhorse'
do
subject
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
send_data
).
to
start_with
(
'artifacts-entry:'
)
expect
(
params
.
keys
).
to
eq
(
%w(Archive Entry)
)
expect
(
params
[
'Archive'
]).
to
start_with
(
archive_path
)
# On object storage, the URL can end with a query string
expect
(
params
[
'Archive'
]).
to
match
(
/build_artifacts.zip(\?[^?]+)?$/
)
expect
(
params
[
'Entry'
]).
to
eq
(
Base64
.
encode64
(
'ci_artifacts.txt'
))
end
def
send_data
response
.
headers
[
Gitlab
::
Workhorse
::
SEND_DATA_HEADER
]
end
def
params
@params
||=
begin
base64_params
=
send_data
.
sub
(
/\Aartifacts\-entry:/
,
''
)
JSON
.
parse
(
Base64
.
urlsafe_decode64
(
base64_params
))
end
end
end
>>>>>>>
upstream
/
master
context
'when using local file storage'
do
it_behaves_like
'a valid file'
do
let
(
:job
)
{
create
(
:ci_build
,
:success
,
:artifacts
,
pipeline:
pipeline
)
}
let
(
:store
)
{
ObjectStoreUploader
::
LOCAL_STORE
}
let
(
:archive_path
)
{
JobArtifactUploader
.
local_store_path
}
end
<<<<<<<
HEAD
end
## EE specific begins
...
...
@@ -193,8 +162,6 @@ describe Projects::ArtifactsController do
let
(
:store
)
{
ObjectStoreUploader
::
REMOTE_STORE
}
let
(
:archive_path
)
{
'https://'
}
end
=======
>>>>>>>
upstream
/
master
end
## EE specific ends
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