Documentation ¶
Overview ¶
Package test contains support code for varous mangos tests.
Index ¶
- func GetTLSConfig(server bool) (*tls.Config, error)
- func NewTLSConfig(server bool) (*tls.Config, error)
- type TranTest
- func (tt *TranTest) TestAll(t *testing.T)
- func (tt *TranTest) TestConnRefused(t *testing.T)
- func (tt *TranTest) TestDialerBadScheme(t *testing.T)
- func (tt *TranTest) TestDialerGetOptionInvalid(t *testing.T)
- func (tt *TranTest) TestDialerSetOptionInvalid(t *testing.T)
- func (tt *TranTest) TestDuplicateListen(t *testing.T)
- func (tt *TranTest) TestListenAndAccept(t *testing.T)
- func (tt *TranTest) TestListenerBadScheme(t *testing.T)
- func (tt *TranTest) TestListenerGetOptionInvalid(t *testing.T)
- func (tt *TranTest) TestListenerSetOptionInvalid(t *testing.T)
- func (tt *TranTest) TestScheme(t *testing.T)
- func (tt *TranTest) TestSendRecv(t *testing.T)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTLSConfig ¶ added in v1.2.0
GetTLSConfig is like NewTLSConfig, but it caches to avoid regenerating key material pointlessly.
Types ¶
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 ¶
NewTranTest creates a TranTest.
func (*TranTest) TestAll ¶ added in v1.2.0
TestAll runs a full battery of standard tests on the transport.
func (*TranTest) TestConnRefused ¶ added in v1.2.0
TestConnRefused tests that attempts to dial to an address without a listener properly fail with EConnRefused.
func (*TranTest) TestDialerBadScheme ¶ added in v1.2.0
TestDialerBadScheme tests to makes sure that giving a bogus scheme to create a dialer fails properly.
func (*TranTest) TestDialerGetOptionInvalid ¶ added in v1.2.0
TestDialerGetOptionInvalid tests attempting to get an invalid option on a Dialer.
func (*TranTest) TestDialerSetOptionInvalid ¶ added in v1.2.0
TestDialerSetOptionInvalid tests trying to set an invalid option on a Dialer.
func (*TranTest) TestDuplicateListen ¶ added in v1.2.0
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
TestListenAndAccept tests that we can both listen and accept connections for the given transport.
func (*TranTest) TestListenerBadScheme ¶ added in v1.2.0
TestListenerBadScheme tests to makes sure that giving a bogus scheme to create a listener fails properly.
func (*TranTest) TestListenerGetOptionInvalid ¶ added in v1.2.0
TestListenerGetOptionInvalid tests trying to get an invalid option on a listener.
func (*TranTest) TestListenerSetOptionInvalid ¶ added in v1.2.0
TestListenerSetOptionInvalid tests passing invalid options to a listener.
func (*TranTest) TestScheme ¶ added in v1.2.0
TestScheme tests the Scheme() entry point on the transport.
func (*TranTest) TestSendRecv ¶ added in v1.2.0
TestSendRecv test that the transport can send and receive. It uses the REQ/REP protocol for messages.