Documentation ¶
Index ¶
- Variables
- func DumpSchema() (string, error)
- func MatchOutput(output Output, flowResult *authflowclient.FlowResponse, flowError error) (resultViolations []MatchViolation, errorViolations []MatchViolation, err error)
- type AuthgearYAMLSource
- type BeforeHook
- type BeforeHookCustomSQL
- type BeforeHookType
- type End2EndCmd
- type MatchViolation
- type Output
- type Step
- type StepAction
- type StepResult
- type TestCase
- type TestRunner
Constants ¶
This section is empty.
Variables ¶
View Source
var TestCaseSchema = validation.NewMultipartSchema("TestCase")
Functions ¶
func DumpSchema ¶
func MatchOutput ¶
func MatchOutput(output Output, flowResult *authflowclient.FlowResponse, flowError error) (resultViolations []MatchViolation, errorViolations []MatchViolation, err error)
Types ¶
type AuthgearYAMLSource ¶
type BeforeHook ¶
type BeforeHook struct { Type BeforeHookType `json:"type"` UserImport string `json:"user_import"` CustomSQL BeforeHookCustomSQL `json:"custom_sql"` }
type BeforeHookCustomSQL ¶
type BeforeHookCustomSQL struct {
Path string `json:"path"`
}
type BeforeHookType ¶
type BeforeHookType string
const ( BeforeHookTypeUserImport BeforeHookType = "user_import" BeforeHookTypeCustomSQL BeforeHookType = "custom_sql" )
type End2EndCmd ¶
func (*End2EndCmd) CreateConfigSource ¶
func (e *End2EndCmd) CreateConfigSource() error
func (*End2EndCmd) ExecuteCustomSQL ¶
func (e *End2EndCmd) ExecuteCustomSQL(sqlPath string) error
func (*End2EndCmd) GetLinkOTPCodeByClaim ¶
func (e *End2EndCmd) GetLinkOTPCodeByClaim(claim string, value string) (string, error)
func (*End2EndCmd) ImportUsers ¶
func (e *End2EndCmd) ImportUsers(jsonPath string) error
type MatchViolation ¶
type MatchViolation struct { Path string `json:"path"` Message string `json:"message"` Expected string `json:"expected"` Actual string `json:"actual"` }
func MatchJSON ¶
func MatchJSON(jsonStr string, schema string) ([]MatchViolation, error)
*
MatchJSON compares a json string to a schema json string, for example { "id": "[[number]]", "title": "[[string]]", "publish": "[[boolean]]", "type": "articles", "tags": ["[[arrayof]]", "[[object]]"], "error": "[[null]]", "ignoreme": "[[ignore]]", } *
type StepAction ¶
type StepAction string
const ( StepActionCreate StepAction = "create" StepActionInput StepAction = "input" StepActionOAuthRedirect StepAction = "oauth_redirect" )
type StepResult ¶
type StepResult struct { Result interface{} `json:"result"` Error error `json:"error"` }
type TestCase ¶
type TestCase struct { Name string `json:"name"` Path string `json:"path"` // Applying focus to a test case will make it the only test case to run, // mainly used for debugging new test cases. Focus bool `json:"focus"` AuthgearYAMLSource AuthgearYAMLSource `json:"authgear.yaml"` Steps []Step `json:"steps"` Before []BeforeHook `json:"before"` }
type TestRunner ¶
func NewTestRunner ¶
func NewTestRunner(t *testing.T, path string) *TestRunner
func (*TestRunner) Run ¶
func (tr *TestRunner) Run()
Click to show internal directories.
Click to hide internal directories.