Documentation ¶
Index ¶
- func Assert(t crossdock.T, tt TT, desc string, got interface{}, err error)
- func BuildArgs(t crossdock.T, desc string, ft reflect.Type, give []interface{}, ...) (_ []reflect.Value, ok bool)
- func BuildDesc(tt TT) string
- func Run(t crossdock.T)
- func RunGauntlet(t crossdock.T, c Config)
- type Config
- type ServiceSet
- type TT
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildArgs ¶
func BuildArgs(t crossdock.T, desc string, ft reflect.Type, give []interface{}, initialArgs int) (_ []reflect.Value, ok bool)
BuildArgs creates an args slice than can be used to make a f.Call(args)
func BuildDesc ¶
BuildDesc creates a logging string for the test
We log in one of the following formats,
$Function: $message $Function: $description: $message $Service: $function: $message $Service: $function: $description: $message
func RunGauntlet ¶
func RunGauntlet(t crossdock.T, c Config)
RunGauntlet takes an rpc object and runs the gauntlet
Types ¶
type Config ¶
type Config struct { Dispatcher *yarpc.Dispatcher // Name of the outbound to which the requests will be sent ServerName string // Whether requests should use Thrift envelopes. Defaults to false. Envelope bool // Bit mask of the different services to call. Defaults to AllServices. Services ServiceSet // Extra options for the Thrift client ClientOptions []thrift.ClientOption // Whether to run oneway tests EnableOneway bool }
Config configures a gauntlet run
type ServiceSet ¶
type ServiceSet int
ServiceSet specifies which services the Gauntlet should make requests to.
const ( ThriftTest ServiceSet = 1 << iota SecondService AllServices = ThriftTest | SecondService )
The different Thrift services that the gauntlet can make requests to.
type TT ¶
type TT struct { Service string // thrift service name; defaults to ThriftTest Function string // name of the Go function on the client Oneway bool // if the function is a oneway function SkipOnServers []string // the test is skipped on given servers because it will fail. Details string // optional extra details about what this test does Give []interface{} // arguments besides context Want interface{} // expected response; nil for void WantError error // expected error WantErrorLike string // for just matching error messages }
TT is the gauntlets table test struct
Click to show internal directories.
Click to hide internal directories.