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
a9b10abc
Commit
a9b10abc
authored
Sep 07, 2018
by
Stan Hu
Committed by
Ash McKenzie
Sep 08, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix push-to-primary API specs with base64 encoding changes
parent
96e157fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
ee/spec/requests/api/geo_spec.rb
ee/spec/requests/api/geo_spec.rb
+5
-4
No files found.
ee/spec/requests/api/geo_spec.rb
View file @
a9b10abc
...
...
@@ -343,7 +343,7 @@ describe API::Geo do
post
api
(
'/geo/proxy_git_push_ssh/info_refs'
),
{
secret_token:
secret_token
,
data:
data
}
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
json_response
[
'result'
]).
to
eql
(
'something+
here'
)
expect
(
Base64
.
decode64
(
json_response
[
'result'
])).
to
eql
(
'something
here'
)
end
end
end
...
...
@@ -360,7 +360,8 @@ describe API::Geo do
end
context
'with all required params'
do
let
(
:output
)
{
'output text'
}
let
(
:text
)
{
'output text'
}
let
(
:output
)
{
Base64
.
encode64
(
text
)
}
let
(
:git_push_ssh_proxy
)
{
double
(
Gitlab
::
Geo
::
GitPushSSHProxy
)
}
before
do
...
...
@@ -391,12 +392,12 @@ describe API::Geo do
let
(
:http_response
)
{
double
(
Net
::
HTTPResponse
,
code:
201
,
body:
'something here'
)
}
it
'responds with 201'
do
expect
(
git_push_ssh_proxy
).
to
receive
(
:push
).
with
(
outpu
t
).
and_return
(
http_response
)
expect
(
git_push_ssh_proxy
).
to
receive
(
:push
).
with
(
tex
t
).
and_return
(
http_response
)
post
api
(
'/geo/proxy_git_push_ssh/push'
),
{
secret_token:
secret_token
,
data:
data
,
output:
output
}
expect
(
response
).
to
have_gitlab_http_status
(
201
)
expect
(
json_response
[
'result'
]).
to
eql
(
'something+
here'
)
expect
(
Base64
.
decode64
(
json_response
[
'result'
])).
to
eql
(
'something
here'
)
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