Documentation ¶
Index ¶
- Constants
- type EncodedTestSuiteRun
- type Repository
- func (r *Repository) Count(ctx context.Context, query string) (int, error)
- func (r *Repository) Create(ctx context.Context, testSuite TestSuite) (TestSuite, error)
- func (r *Repository) DB() *sql.DB
- func (r *Repository) Delete(ctx context.Context, id id.ID) error
- func (r *Repository) Get(ctx context.Context, id id.ID) (TestSuite, error)
- func (r *Repository) GetAugmented(ctx context.Context, id id.ID) (TestSuite, error)
- func (r *Repository) GetLatestVersion(ctx context.Context, id id.ID) (TestSuite, error)
- func (r *Repository) GetVersion(ctx context.Context, id id.ID, version int) (TestSuite, error)
- func (r *Repository) IDExists(ctx context.Context, id id.ID) (bool, error)
- func (r *Repository) List(ctx context.Context, take, skip int, query, sortBy, sortDirection string) ([]TestSuite, error)
- func (r *Repository) ListAugmented(ctx context.Context, take, skip int, query, sortBy, sortDirection string) ([]TestSuite, error)
- func (r *Repository) Provision(ctx context.Context, testSuite TestSuite) error
- func (r *Repository) SetID(t TestSuite, id id.ID) TestSuite
- func (r *Repository) SortingFields() []string
- func (r *Repository) Update(ctx context.Context, testSuite TestSuite) (TestSuite, error)
- type RunRepository
- func (td *RunRepository) CreateRun(ctx context.Context, tr TestSuiteRun) (TestSuiteRun, error)
- func (td *RunRepository) DeleteTestSuiteRun(ctx context.Context, tr TestSuiteRun) error
- func (td *RunRepository) GetLatestRunByTestSuiteVersion(ctx context.Context, ID id.ID, version int) (TestSuiteRun, error)
- func (td *RunRepository) GetTestSuiteRun(ctx context.Context, ID id.ID, runID int) (TestSuiteRun, error)
- func (td *RunRepository) GetTestSuiteRuns(ctx context.Context, ID id.ID, take, skip int32) ([]TestSuiteRun, error)
- func (td *RunRepository) UpdateRun(ctx context.Context, tr TestSuiteRun) error
- type TestSuite
- type TestSuiteRun
- func (r TestSuiteRun) MarshalJSON() ([]byte, error)
- func (tr TestSuiteRun) ResourceID() string
- func (tr TestSuiteRun) ResultsCount() (pass, fail int)
- func (tr TestSuiteRun) RunMetadata(step int) test.RunMetadata
- func (tr TestSuiteRun) StepsGatesValidation() bool
- func (r *TestSuiteRun) UnmarshalJSON(data []byte) error
- type TestSuiteRunState
Constants ¶
View Source
const ( TestSuiteResourceName = "TestSuite" TestSuiteResourceNamePlural = "TestSuites" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EncodedTestSuiteRun ¶ added in v0.15.4
type EncodedTestSuiteRun struct { ID int TestSuiteID id.ID TestSuiteVersion int CreatedAt time.Time CompletedAt time.Time State TestSuiteRunState CurrentTest int JsonSteps, JsonStepIDs, JsonVariableSet, JsonMetadata []byte LastError string Pass, Fail sql.NullInt32 AllStepsRequiredGatesPassed bool }
func EncodeRun ¶ added in v0.15.4
func EncodeRun(run TestSuiteRun) (EncodedTestSuiteRun, error)
func (EncodedTestSuiteRun) ToTestSuiteRun ¶ added in v0.15.4
func (r EncodedTestSuiteRun) ToTestSuiteRun() (TestSuiteRun, error)
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(db *sql.DB, stepRepository testSuiteStepRepository) *Repository
func (*Repository) GetAugmented ¶
func (*Repository) GetLatestVersion ¶
func (*Repository) GetVersion ¶
func (*Repository) ListAugmented ¶
func (*Repository) Provision ¶
func (r *Repository) Provision(ctx context.Context, testSuite TestSuite) error
func (*Repository) SortingFields ¶
func (r *Repository) SortingFields() []string
type RunRepository ¶
type RunRepository struct {
// contains filtered or unexported fields
}
func NewRunRepository ¶
func NewRunRepository(db *sql.DB, stepsRepository testSuiteStepRunRepository) *RunRepository
func (*RunRepository) CreateRun ¶
func (td *RunRepository) CreateRun(ctx context.Context, tr TestSuiteRun) (TestSuiteRun, error)
func (*RunRepository) DeleteTestSuiteRun ¶
func (td *RunRepository) DeleteTestSuiteRun(ctx context.Context, tr TestSuiteRun) error
func (*RunRepository) GetLatestRunByTestSuiteVersion ¶
func (td *RunRepository) GetLatestRunByTestSuiteVersion(ctx context.Context, ID id.ID, version int) (TestSuiteRun, error)
func (*RunRepository) GetTestSuiteRun ¶
func (td *RunRepository) GetTestSuiteRun(ctx context.Context, ID id.ID, runID int) (TestSuiteRun, error)
func (*RunRepository) GetTestSuiteRuns ¶
func (td *RunRepository) GetTestSuiteRuns(ctx context.Context, ID id.ID, take, skip int32) ([]TestSuiteRun, error)
func (*RunRepository) UpdateRun ¶
func (td *RunRepository) UpdateRun(ctx context.Context, tr TestSuiteRun) error
type TestSuite ¶
type TestSuite struct { ID id.ID `json:"id"` CreatedAt *time.Time `json:"createdAt,omitempty"` Name string `json:"name"` Description string `json:"description"` Version *int `json:"version,omitempty"` StepIDs []id.ID `json:"steps"` Steps []test.Test `json:"fullSteps,omitempty"` Summary *test.Summary `json:"summary,omitempty"` }
func (TestSuite) GetCreatedAt ¶
func (TestSuite) GetVersion ¶
func (TestSuite) NewRun ¶
func (t TestSuite) NewRun() TestSuiteRun
type TestSuiteRun ¶
type TestSuiteRun struct { ID int TestSuiteID id.ID TestSuiteVersion int // Timestamps CreatedAt time.Time CompletedAt time.Time // steps StepIDs []int Steps []test.Run // trigger params State TestSuiteRunState CurrentTest int // result info LastError error Pass int Fail int AllStepsRequiredGatesPassed bool Metadata test.RunMetadata // variable set VariableSet variableset.VariableSet RequiredGates *[]testrunner.RequiredGate }
func (TestSuiteRun) MarshalJSON ¶ added in v0.15.4
func (r TestSuiteRun) MarshalJSON() ([]byte, error)
func (TestSuiteRun) ResourceID ¶
func (tr TestSuiteRun) ResourceID() string
func (TestSuiteRun) ResultsCount ¶
func (tr TestSuiteRun) ResultsCount() (pass, fail int)
func (TestSuiteRun) RunMetadata ¶ added in v0.14.8
func (tr TestSuiteRun) RunMetadata(step int) test.RunMetadata
func (TestSuiteRun) StepsGatesValidation ¶
func (tr TestSuiteRun) StepsGatesValidation() bool
func (*TestSuiteRun) UnmarshalJSON ¶ added in v0.15.4
func (r *TestSuiteRun) UnmarshalJSON(data []byte) error
type TestSuiteRunState ¶
type TestSuiteRunState string
const ( TestSuiteStateCreated TestSuiteRunState = "CREATED" TestSuiteStateExecuting TestSuiteRunState = "EXECUTING" TestSuiteStateFailed TestSuiteRunState = "FAILED" TestSuiteStateFinished TestSuiteRunState = "FINISHED" )
func (TestSuiteRunState) IsFinal ¶
func (rs TestSuiteRunState) IsFinal() bool
Click to show internal directories.
Click to hide internal directories.