Skip to content

Commit 1a3670a

Browse files
author
Aaron Schlesinger
committed
fix(pkg/sshd/server_test.go): write test for gitPktLine
1 parent d0e0952 commit 1a3670a

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

pkg/sshd/server_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
package sshd
22

33
import (
4+
"bytes"
45
"net"
56
"testing"
67
"time"
78

89
"github.com/deis/builder/pkg/controller"
910

1011
"github.com/Masterminds/cookoo"
12+
"github.com/arschles/assert"
1113
"github.com/deis/builder/pkg/cleaner"
1214
"golang.org/x/crypto/ssh"
1315
)
@@ -19,6 +21,14 @@ const (
1921
gitHome = "/git"
2022
)
2123

24+
func TestGitPktLine(t *testing.T) {
25+
b := new(bytes.Buffer)
26+
str := "hello world"
27+
err := gitPktLine(b, str)
28+
assert.NoErr(t, err)
29+
t.Logf(string(b.Bytes()))
30+
}
31+
2232
// TestServer tests the SSH server.
2333
//
2434
// This listens on the non-standard port 2244 of localhost. This will generate

0 commit comments

Comments
 (0)