github.com/badrootd/nibiru-cometbft@v0.37.5-0.20240307173500-2a75559eee9b/abci/tests/client_server_test.go (about) 1 package tests 2 3 import ( 4 "testing" 5 6 "github.com/stretchr/testify/assert" 7 8 abciclient "github.com/badrootd/nibiru-cometbft/abci/client" 9 "github.com/badrootd/nibiru-cometbft/abci/example/kvstore" 10 abciserver "github.com/badrootd/nibiru-cometbft/abci/server" 11 ) 12 13 func TestClientServerNoAddrPrefix(t *testing.T) { 14 addr := "localhost:26658" 15 transport := "socket" 16 app := kvstore.NewApplication() 17 18 server, err := abciserver.NewServer(addr, transport, app) 19 assert.NoError(t, err, "expected no error on NewServer") 20 err = server.Start() 21 assert.NoError(t, err, "expected no error on server.Start") 22 defer func() { _ = server.Stop() }() 23 24 client, err := abciclient.NewClient(addr, transport, true) 25 assert.NoError(t, err, "expected no error on NewClient") 26 err = client.Start() 27 assert.NoError(t, err, "expected no error on client.Start") 28 29 _ = client.Stop() 30 }