Skip to content

Commit

Permalink
Add TestServer_ListenAndServe func
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkren committed Jun 2, 2019
1 parent 319b364 commit 2cc309c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/dms/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ func TestNewServer(t *testing.T) {
assert.NoError(t, s.Close())
}

func TestServer_ListenAndServe(t *testing.T) {
sPK, sSK := cipher.GenerateKeyPair()
dc := client.NewMock()

s := NewServer(sPK, sSK, "", dc)
go s.ListenAndServe("")

}

// Given two client instances (a & b) and a server instance (s),
// Client b should be able to dial a transport with client b
// Data should be sent and delivered successfully via the transport.
Expand Down

0 comments on commit 2cc309c

Please sign in to comment.