Documentation ¶
Index ¶
- func ChangeNamespace(cmd *Command, env, namespace string) error
- func Login(serv Server, t *T, email, password string) error
- func Try(blockName string, t *T, f cmdFunc, maxTime time.Duration) error
- func TrySuite(t *testing.T, f func(t *T), times int)
- type Command
- type NewServerFunc
- type Option
- type Options
- type Server
- type ServerBase
- type ServerDefault
- type T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangeNamespace ¶
ChangeNamespace for service
Types ¶
type Command ¶
type Command struct { Env string Config string Dir string sync.Mutex // contains filtered or unexported fields }
Command for test
type Option ¶
type Option func(o *Options)
func WithDisableAdmin ¶
func WithDisableAdmin() Option
func WithNamespace ¶
type Server ¶
type Server interface { // Run the server Run() error // Close shuts down the server Close() // Command provides a `micro` command for the server Command() *Command // Name of the environment Env() string // APIPort is the port the api is exposed on APIPort() int // ProxyPort is the port the proxy is exposed on ProxyPort() int }
Server is a micro server
type ServerBase ¶
type ServerBase struct {
// contains filtered or unexported fields
}
ServerBase for test
func (*ServerBase) APIPort ¶
func (s *ServerBase) APIPort() int
func (*ServerBase) Close ¶
func (s *ServerBase) Close()
func (*ServerBase) Command ¶
func (s *ServerBase) Command() *Command
func (*ServerBase) Env ¶
func (s *ServerBase) Env() string
func (*ServerBase) ProxyPort ¶
func (s *ServerBase) ProxyPort() int
func (*ServerBase) Run ¶
func (s *ServerBase) Run() error
error value should not be used but caller should return in the test suite in case of error.
type ServerDefault ¶
type ServerDefault struct {
ServerBase
}
func (*ServerDefault) Close ¶
func (s *ServerDefault) Close()
func (*ServerDefault) Run ¶
func (s *ServerDefault) Run() error
type T ¶
type T struct {
// contains filtered or unexported fields
}
func (*T) Fatal ¶
func (t *T) Fatal(values ...interface{})
Fatal logs and exits immediately. Assumes it has come from a TrySuite() call. If called from within goroutine it does not immediately exit.
Click to show internal directories.
Click to hide internal directories.