v1.4.0 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2018 License: Apache-2.0 Imports: 16 Imported by: 0



Package test contains support code for varous mangos tests.



This section is empty.


This section is empty.


func GetTLSConfig added in v1.2.0

func GetTLSConfig(server bool) (*tls.Config, error)

GetTLSConfig is like NewTLSConfig, but it caches to avoid regenerating key material pointlessly.

func NewTLSConfig added in v1.2.0

func NewTLSConfig(server bool) (*tls.Config, error)

NewTLSConfig creates a suitable TLS configuration, using either a server or client. A self-signed CA Cert is included.


type TranTest

type TranTest struct {
	// contains filtered or unexported fields

TranTest provides a common test structure for transports, so that they can implement a battery of standard tests.

func NewTranTest

func NewTranTest(tran mangos.Transport, addr string) *TranTest

NewTranTest creates a TranTest.

func (*TranTest) TestAll added in v1.2.0

func (tt *TranTest) TestAll(t *testing.T)

TestAll runs a full battery of standard tests on the transport.

func (*TranTest) TestConnRefused added in v1.2.0

func (tt *TranTest) TestConnRefused(t *testing.T)

TestConnRefused tests that attempts to dial to an address without a listener properly fail with EConnRefused.

func (*TranTest) TestDialerBadScheme added in v1.2.0

func (tt *TranTest) TestDialerBadScheme(t *testing.T)

TestDialerBadScheme tests to makes sure that giving a bogus scheme to create a dialer fails properly.

func (*TranTest) TestDialerGetOptionInvalid added in v1.2.0

func (tt *TranTest) TestDialerGetOptionInvalid(t *testing.T)

TestDialerGetOptionInvalid tests attempting to get an invalid option on a Dialer.

func (*TranTest) TestDialerSetOptionInvalid added in v1.2.0

func (tt *TranTest) TestDialerSetOptionInvalid(t *testing.T)

TestDialerSetOptionInvalid tests trying to set an invalid option on a Dialer.

func (*TranTest) TestDuplicateListen added in v1.2.0

func (tt *TranTest) TestDuplicateListen(t *testing.T)

TestDuplicateListen checks to make sure that an attempt to listen on a second socket, when another listener is already present, properly fails with ErrAddrInUse.

func (*TranTest) TestListenAndAccept added in v1.2.0

func (tt *TranTest) TestListenAndAccept(t *testing.T)

TestListenAndAccept tests that we can both listen and accept connections for the given transport.

func (*TranTest) TestListenerBadScheme added in v1.2.0

func (tt *TranTest) TestListenerBadScheme(t *testing.T)

TestListenerBadScheme tests to makes sure that giving a bogus scheme to create a listener fails properly.

func (*TranTest) TestListenerGetOptionInvalid added in v1.2.0

func (tt *TranTest) TestListenerGetOptionInvalid(t *testing.T)

TestListenerGetOptionInvalid tests trying to get an invalid option on a listener.

func (*TranTest) TestListenerSetOptionInvalid added in v1.2.0

func (tt *TranTest) TestListenerSetOptionInvalid(t *testing.T)

TestListenerSetOptionInvalid tests passing invalid options to a listener.

func (*TranTest) TestScheme added in v1.2.0

func (tt *TranTest) TestScheme(t *testing.T)

TestScheme tests the Scheme() entry point on the transport.

func (*TranTest) TestSendRecv added in v1.2.0

func (tt *TranTest) TestSendRecv(t *testing.T)

TestSendRecv test that the transport can send and receive. It uses the REQ/REP protocol for messages.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL