summaryrefslogtreecommitdiff
path: root/internal/sshd/session_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/sshd/session_test.go')
-rw-r--r--internal/sshd/session_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/sshd/session_test.go b/internal/sshd/session_test.go
index f135825..d0cc8d4 100644
--- a/internal/sshd/session_test.go
+++ b/internal/sshd/session_test.go
@@ -99,6 +99,7 @@ func TestHandleExec(t *testing.T) {
expectedExecCmd string
sentRequestName string
sentRequestPayload []byte
+ success bool
}{
{
desc: "invalid payload",
@@ -111,6 +112,7 @@ func TestHandleExec(t *testing.T) {
expectedExecCmd: "discover",
sentRequestName: "exit-status",
sentRequestPayload: ssh.Marshal(exitStatusReq{ExitStatus: 0}),
+ success: true,
},
}
@@ -130,6 +132,7 @@ func TestHandleExec(t *testing.T) {
require.Equal(t, false, s.handleExec(context.Background(), r))
require.Equal(t, tc.sentRequestName, f.sentRequestName)
require.Equal(t, tc.sentRequestPayload, f.sentRequestPayload)
+ require.Equal(t, tc.success, s.success)
})
}
}
@@ -141,6 +144,7 @@ func TestHandleShell(t *testing.T) {
errMsg string
gitlabKeyId string
expectedExitCode uint32
+ success bool
}{
{
desc: "fails to parse command",