Documentation ¶
Overview ¶
Package integration contains helpers for integration testing.
Normally users writing integration tests should not use this package directly, instead they should use the packges in subdirectories of this package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cmd ¶
Cmd is an external command being prepared or run.
A Cmd cannot be reused after calling its Run, Output or CombinedOutput methods.
func New ¶
New creates a new, unstarted, command.
The provided context is used to kill the process (by calling os.Process.Kill) if the context becomes done before the command completes on its own.
func (*Cmd) C2SListen ¶
C2SListen returns a listener with a random port. The listener is created on the first call to C2SListener. Subsequent calls ignore the arguments and return the existing listener.
func (*Cmd) Close ¶
Close kills the command if it is still running and cleans up any temporary resources that were created.
func (*Cmd) Dial ¶
func (cmd *Cmd) Dial(ctx context.Context, j jid.JID, t *testing.T, features ...xmpp.StreamFeature) (*xmpp.Session, error)
Dial attempts to connect to the server by dialing localhost and then negotiating a stream with the location set to the domainpart of j and the origin set to j.
type Option ¶
Option is used to configure a Cmd.
func LogXML ¶
func LogXML() Option
LogXML configures the command to log sent and received XML to the current testing.T.
type SubtestRunner ¶
SubtestRunner is the signature of a function that can be used to start subtests.
Directories ¶
Path | Synopsis |
---|---|
Package ejabberd facilitates integration testing against Ejabberd.
|
Package ejabberd facilitates integration testing against Ejabberd. |
Package prosody facilitates integration testing against Prosody.
|
Package prosody facilitates integration testing against Prosody. |