summaryrefslogtreecommitdiff
path: root/internal/command/uploadpack/gitalycall_test.go
diff options
context:
space:
mode:
authorDavid Kim <dkim@gitlab.com>2020-04-03 12:46:40 +1030
committerDavid Kim <dkim@gitlab.com>2020-04-03 12:46:40 +1030
commit1af1245ec4a9fc330a7d4979a55a5fee1aca82cb (patch)
tree4c7d0ebe013c516f197bf117b4bcce8f53915eef /internal/command/uploadpack/gitalycall_test.go
parent3f3a405c181840e2de13ffb22f7a50fd78054dc0 (diff)
downloadgitlab-shell-1af1245ec4a9fc330a7d4979a55a5fee1aca82cb.tar.gz
Add test for command logging
Diffstat (limited to 'internal/command/uploadpack/gitalycall_test.go')
-rw-r--r--internal/command/uploadpack/gitalycall_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/command/uploadpack/gitalycall_test.go b/internal/command/uploadpack/gitalycall_test.go
index 86dfbf1..e5fe8b2 100644
--- a/internal/command/uploadpack/gitalycall_test.go
+++ b/internal/command/uploadpack/gitalycall_test.go
@@ -2,8 +2,8 @@ package uploadpack
import (
"bytes"
- "testing"
"strings"
+ "testing"
"github.com/sirupsen/logrus"
@@ -14,8 +14,8 @@ import (
"gitlab.com/gitlab-org/gitlab-shell/internal/command/readwriter"
"gitlab.com/gitlab-org/gitlab-shell/internal/config"
"gitlab.com/gitlab-org/gitlab-shell/internal/gitlabnet/testserver"
- "gitlab.com/gitlab-org/gitlab-shell/internal/testhelper/requesthandlers"
"gitlab.com/gitlab-org/gitlab-shell/internal/testhelper"
+ "gitlab.com/gitlab-org/gitlab-shell/internal/testhelper/requesthandlers"
)
func TestUploadPack(t *testing.T) {
@@ -46,6 +46,7 @@ func TestUploadPack(t *testing.T) {
require.Equal(t, "UploadPack: "+repo, output.String())
require.Equal(t, logrus.InfoLevel, hook.LastEntry().Level)
require.True(t, strings.Contains(hook.LastEntry().Message, "executing git command"))
+ require.True(t, strings.Contains(hook.LastEntry().Message, "command=git-upload-pack"))
for k, v := range map[string]string{
"gitaly-feature-cache_invalidator": "true",