summaryrefslogtreecommitdiff
path: root/internal/sshd/session_test.go
diff options
context:
space:
mode:
authorIgor Drozdov <idrozdov@gitlab.com>2021-09-28 19:08:34 +0000
committerIgor Drozdov <idrozdov@gitlab.com>2021-09-28 19:08:34 +0000
commit6d146c217dc1ba78aa4a0c47c59b5b2e7be774d9 (patch)
tree0d70e3e65b0192089d6dd04b0ac8120341ba7de8 /internal/sshd/session_test.go
parenta1ae9e5ad2900d512a58ce64f4ad0f02769c3edd (diff)
parentf40ddda89781aeb156f9b36bdb7d733c55b363c0 (diff)
downloadgitlab-shell-6d146c217dc1ba78aa4a0c47c59b5b2e7be774d9.tar.gz
Merge branch '499-log-me-more' into 'main'
Add more logging to gitlab-sshd See merge request gitlab-org/gitlab-shell!531
Diffstat (limited to 'internal/sshd/session_test.go')
-rw-r--r--internal/sshd/session_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/sshd/session_test.go b/internal/sshd/session_test.go
index b014c0c..f135825 100644
--- a/internal/sshd/session_test.go
+++ b/internal/sshd/session_test.go
@@ -86,7 +86,7 @@ func TestHandleEnv(t *testing.T) {
s := &session{gitProtocolVersion: "1"}
r := &ssh.Request{Payload: tc.payload}
- require.Equal(t, s.handleEnv(r), tc.expectedResult)
+ require.Equal(t, s.handleEnv(context.Background(), r), tc.expectedResult)
require.Equal(t, s.gitProtocolVersion, tc.expectedProtocolVersion)
})
}
@@ -145,7 +145,7 @@ func TestHandleShell(t *testing.T) {
{
desc: "fails to parse command",
cmd: `\`,
- errMsg: "Failed to parse command: Invalid SSH command\nUnknown command: \\\n",
+ errMsg: "Failed to parse command: Invalid SSH command: invalid command line string\nUnknown command: \\\n",
gitlabKeyId: "root",
expectedExitCode: 128,
}, {