Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-shell
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
0
Merge Requests
0
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-shell
Commits
bcccc30c
Commit
bcccc30c
authored
Dec 03, 2019
by
Ash McKenzie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add git-lfs upload operation assertion
parent
f0a6e62d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
internal/command/lfsauthenticate/lfsauthenticate_test.go
internal/command/lfsauthenticate/lfsauthenticate_test.go
+3
-1
No files found.
internal/command/lfsauthenticate/lfsauthenticate_test.go
View file @
bcccc30c
...
...
@@ -64,6 +64,7 @@ func TestFailedRequests(t *testing.T) {
func
TestLfsAuthenticateRequests
(
t
*
testing
.
T
)
{
userId
:=
"123"
operation
:=
"upload"
requests
:=
[]
testserver
.
TestRequestHandler
{
{
...
...
@@ -75,6 +76,7 @@ func TestLfsAuthenticateRequests(t *testing.T) {
var
request
*
lfsauthenticate
.
Request
require
.
NoError
(
t
,
json
.
Unmarshal
(
b
,
&
request
))
require
.
Equal
(
t
,
request
.
Operation
,
operation
)
if
request
.
UserId
==
userId
{
body
:=
map
[
string
]
interface
{}{
...
...
@@ -140,7 +142,7 @@ func TestLfsAuthenticateRequests(t *testing.T) {
output
:=
&
bytes
.
Buffer
{}
cmd
:=
&
Command
{
Config
:
&
config
.
Config
{
GitlabUrl
:
url
},
Args
:
&
commandargs
.
Shell
{
GitlabUsername
:
tc
.
username
,
SshArgs
:
[]
string
{
"git-lfs-authenticate"
,
"group/repo"
,
"upload"
}},
Args
:
&
commandargs
.
Shell
{
GitlabUsername
:
tc
.
username
,
SshArgs
:
[]
string
{
"git-lfs-authenticate"
,
"group/repo"
,
operation
}},
ReadWriter
:
&
readwriter
.
ReadWriter
{
ErrOut
:
output
,
Out
:
output
},
}
...
...
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