diff options
author | Igor Drozdov <idrozdov@gitlab.com> | 2019-04-28 20:42:19 +0300 |
---|---|---|
committer | Igor Drozdov <idrozdov@gitlab.com> | 2019-06-06 13:21:58 +0300 |
commit | 5aa947ed705b48b2980894012eb32e7ee5147b5e (patch) | |
tree | 3557c79227b01376a90f381c5f60f0ef42727baa /go/internal/command/commandargs | |
parent | eb2b186f7d209a638b7523c674bc79cbafe764b6 (diff) | |
download | gitlab-shell-id-git-lfs-authenticate.tar.gz |
Go implementation for LFS authenticateid-git-lfs-authenticate
Diffstat (limited to 'go/internal/command/commandargs')
-rw-r--r-- | go/internal/command/commandargs/command_args.go | 1 | ||||
-rw-r--r-- | go/internal/command/commandargs/command_args_test.go | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/go/internal/command/commandargs/command_args.go b/go/internal/command/commandargs/command_args.go index fd9d741..d8fe32d 100644 --- a/go/internal/command/commandargs/command_args.go +++ b/go/internal/command/commandargs/command_args.go @@ -13,6 +13,7 @@ type CommandType string const ( Discover CommandType = "discover" TwoFactorRecover CommandType = "2fa_recovery_codes" + LfsAuthenticate CommandType = "git-lfs-authenticate" ReceivePack CommandType = "git-receive-pack" UploadPack CommandType = "git-upload-pack" UploadArchive CommandType = "git-upload-archive" diff --git a/go/internal/command/commandargs/command_args_test.go b/go/internal/command/commandargs/command_args_test.go index 7c360ad..e60bb92 100644 --- a/go/internal/command/commandargs/command_args_test.go +++ b/go/internal/command/commandargs/command_args_test.go @@ -90,6 +90,13 @@ func TestParseSuccess(t *testing.T) { "SSH_ORIGINAL_COMMAND": "git-upload-archive 'group/repo'", }, expectedArgs: &CommandArgs{SshArgs: []string{"git-upload-archive", "group/repo"}, CommandType: UploadArchive}, + }, { + desc: "It parses git-lfs-authenticate command", + environment: map[string]string{ + "SSH_CONNECTION": "1", + "SSH_ORIGINAL_COMMAND": "git-lfs-authenticate 'group/repo' download", + }, + expectedArgs: &CommandArgs{SshArgs: []string{"git-lfs-authenticate", "group/repo", "download"}, CommandType: LfsAuthenticate}, }, } |