Browse Source

tests: add simple client/server test with no addr prefix

pull/1780/head
Ethan Buchman 7 years ago
parent
commit
4884747eb7
1 changed files with 27 additions and 0 deletions
  1. +27
    -0
      tests/client_server_test.go

+ 27
- 0
tests/client_server_test.go View File

@ -0,0 +1,27 @@
package main
import (
"testing"
"github.com/stretchr/testify/assert"
abciclient "github.com/tendermint/abci/client"
"github.com/tendermint/abci/example/dummy"
abciserver "github.com/tendermint/abci/server"
)
func TestClientServerNoAddrPrefix(t *testing.T) {
addr := "localhost:46658"
transport := "socket"
app := dummy.NewDummyApplication()
server, err := abciserver.NewServer(addr, transport, app)
assert.NoError(t, err, "expected no error on NewServer")
_, err = server.Start()
assert.NoError(t, err, "expected no error on server.Start")
client, err := abciclient.NewClient(addr, transport, true)
assert.NoError(t, err, "expected no error on NewClient")
_, err = client.Start()
assert.NoError(t, err, "expected no error on client.Start")
}

Loading…
Cancel
Save