Documentation ¶
Index ¶
- func MapRenderPath(raw *url.URL, params map[string]interface{}) error
- func RenderPath(raw *url.URL, vstring string) error
- func RenderReqPath(req *curl.Request, param interface{}) error
- type ApiReturnAssume
- type ApiTestCase
- type EtcdV3ConfigLoader
- type HTTPTestCase
- type HTTPTestContext
- func (c *HTTPTestContext) AddExtraClient(key string, client *curl.Client)
- func (c *HTTPTestContext) ExtraFetchAndAssume(key string, req *curl.Request, assume *ApiReturnAssume) (res *curl.Response, err error)
- func (c *HTTPTestContext) FetchAndAssume(req *curl.Request, assume *ApiReturnAssume) (res *curl.Response, err error)
- func (c *HTTPTestContext) Get(key interface{}) (value interface{}, ok bool)
- func (c *HTTPTestContext) GetInt(key interface{}) (value int, ok bool)
- func (c *HTTPTestContext) GetString(key interface{}) (value string, ok bool)
- func (c *HTTPTestContext) Set(key, value interface{})
- type JobAction
- type JobTestCase
- type TestApiAction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapRenderPath ¶ added in v0.4.3
func RenderReqPath ¶ added in v0.4.3
Types ¶
type ApiReturnAssume ¶ added in v0.4.3
func ApiAssume ¶ added in v0.4.3
func ApiAssume() *ApiReturnAssume
func (*ApiReturnAssume) BodyVerifyBy ¶ added in v0.4.3
func (r *ApiReturnAssume) BodyVerifyBy(schema string) *ApiReturnAssume
very Body by jsonschema write in yaml
func (*ApiReturnAssume) Status ¶ added in v0.4.3
func (r *ApiReturnAssume) Status(s int) *ApiReturnAssume
type ApiTestCase ¶ added in v0.4.3
type ApiTestCase struct { Method string Path string Action TestApiAction }
func NewApiCase ¶ added in v0.4.3
func NewApiCase(method, path string, action TestApiAction) *ApiTestCase
func (*ApiTestCase) Run ¶ added in v0.5.2
func (c *ApiTestCase) Run(ctx *HTTPTestContext) error
type EtcdV3ConfigLoader ¶
EtcdV3ConfigLoader config loader load config from etcdv3
func NewEtcdV3ConfigLoader ¶
func NewEtcdV3ConfigLoader(endpoint, key string) *EtcdV3ConfigLoader
NewEtcdV3ConfigLoader create a etcdv3 config loader
func (*EtcdV3ConfigLoader) LoadConfig ¶
func (l *EtcdV3ConfigLoader) LoadConfig(vc *viper.Viper) error
LoadConfig implement config loader
type HTTPTestCase ¶ added in v0.5.2
type HTTPTestCase interface {
Run(ctx *HTTPTestContext) error
}
type HTTPTestContext ¶ added in v0.4.3
type HTTPTestContext struct {
// contains filtered or unexported fields
}
func NewHTTPTestContext ¶ added in v0.4.3
func NewHTTPTestContext(client *curl.Client) *HTTPTestContext
func (*HTTPTestContext) AddExtraClient ¶ added in v0.4.3
func (c *HTTPTestContext) AddExtraClient(key string, client *curl.Client)
func (*HTTPTestContext) ExtraFetchAndAssume ¶ added in v0.4.3
func (c *HTTPTestContext) ExtraFetchAndAssume(key string, req *curl.Request, assume *ApiReturnAssume) (res *curl.Response, err error)
func (*HTTPTestContext) FetchAndAssume ¶ added in v0.4.3
func (c *HTTPTestContext) FetchAndAssume(req *curl.Request, assume *ApiReturnAssume) (res *curl.Response, err error)
func (*HTTPTestContext) Get ¶ added in v0.4.3
func (c *HTTPTestContext) Get(key interface{}) (value interface{}, ok bool)
func (*HTTPTestContext) GetInt ¶ added in v0.4.3
func (c *HTTPTestContext) GetInt(key interface{}) (value int, ok bool)
func (*HTTPTestContext) GetString ¶ added in v0.4.3
func (c *HTTPTestContext) GetString(key interface{}) (value string, ok bool)
func (*HTTPTestContext) Set ¶ added in v0.4.3
func (c *HTTPTestContext) Set(key, value interface{})
type JobAction ¶ added in v0.5.2
type JobAction func(ctx *HTTPTestContext) error
type JobTestCase ¶ added in v0.5.2
type JobTestCase struct {
// contains filtered or unexported fields
}
func NewJobCase ¶ added in v0.5.2
func NewJobCase(action JobAction) *JobTestCase
func (*JobTestCase) Run ¶ added in v0.5.2
func (c *JobTestCase) Run(ctx *HTTPTestContext) error
type TestApiAction ¶ added in v0.4.3
type TestApiAction func(ctx *HTTPTestContext, req *curl.Request) error
Click to show internal directories.
Click to hide internal directories.