Documentation ¶
Overview ¶
Package testresult is a generated GoMock package.
Index ¶
- Constants
- func NewExecutionsFilter() *filter
- type Filter
- type MockRepository
- func (m *MockRepository) DeleteAll(arg0 context.Context) error
- func (m *MockRepository) DeleteByTestSuite(arg0 context.Context, arg1 string) error
- func (m *MockRepository) DeleteByTestSuites(arg0 context.Context, arg1 []string) error
- func (m *MockRepository) EXPECT() *MockRepositoryMockRecorder
- func (m *MockRepository) EndExecution(arg0 context.Context, arg1 testkube.TestSuiteExecution) error
- func (m *MockRepository) Get(arg0 context.Context, arg1 string) (testkube.TestSuiteExecution, error)
- func (m *MockRepository) GetByNameAndTestSuite(arg0 context.Context, arg1, arg2 string) (testkube.TestSuiteExecution, error)
- func (m *MockRepository) GetExecutions(arg0 context.Context, arg1 Filter) ([]testkube.TestSuiteExecution, error)
- func (m *MockRepository) GetExecutionsTotals(arg0 context.Context, arg1 ...Filter) (testkube.ExecutionsTotals, error)
- func (m *MockRepository) GetLatestByTestSuite(arg0 context.Context, arg1, arg2 string) (testkube.TestSuiteExecution, error)
- func (m *MockRepository) GetLatestByTestSuites(arg0 context.Context, arg1 []string, arg2 string) ([]testkube.TestSuiteExecution, error)
- func (m *MockRepository) GetTestSuiteMetrics(arg0 context.Context, arg1 string, arg2, arg3 int) (testkube.ExecutionsMetrics, error)
- func (m *MockRepository) Insert(arg0 context.Context, arg1 testkube.TestSuiteExecution) error
- func (m *MockRepository) StartExecution(arg0 context.Context, arg1 string, arg2 time.Time) error
- func (m *MockRepository) Update(arg0 context.Context, arg1 testkube.TestSuiteExecution) error
- type MockRepositoryMockRecorder
- func (mr *MockRepositoryMockRecorder) DeleteAll(arg0 interface{}) *gomock.Call
- func (mr *MockRepositoryMockRecorder) DeleteByTestSuite(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockRepositoryMockRecorder) DeleteByTestSuites(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockRepositoryMockRecorder) EndExecution(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockRepositoryMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockRepositoryMockRecorder) GetByNameAndTestSuite(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockRepositoryMockRecorder) GetExecutions(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockRepositoryMockRecorder) GetExecutionsTotals(arg0 interface{}, arg1 ...interface{}) *gomock.Call
- func (mr *MockRepositoryMockRecorder) GetLatestByTestSuite(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockRepositoryMockRecorder) GetLatestByTestSuites(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockRepositoryMockRecorder) GetTestSuiteMetrics(arg0, arg1, arg2, arg3 interface{}) *gomock.Call
- func (mr *MockRepositoryMockRecorder) Insert(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockRepositoryMockRecorder) StartExecution(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockRepositoryMockRecorder) Update(arg0, arg1 interface{}) *gomock.Call
- type MongoRepository
- func (r *MongoRepository) DeleteAll(ctx context.Context) (err error)
- func (r *MongoRepository) DeleteByTestSuite(ctx context.Context, testSuiteName string) (err error)
- func (r *MongoRepository) DeleteByTestSuites(ctx context.Context, testSuiteNames []string) (err error)
- func (r *MongoRepository) EndExecution(ctx context.Context, e testkube.TestSuiteExecution) (err error)
- func (r *MongoRepository) Get(ctx context.Context, id string) (result testkube.TestSuiteExecution, err error)
- func (r *MongoRepository) GetByNameAndTestSuite(ctx context.Context, name, testSuiteName string) (result testkube.TestSuiteExecution, err error)
- func (r *MongoRepository) GetExecutions(ctx context.Context, filter Filter) (result []testkube.TestSuiteExecution, err error)
- func (r *MongoRepository) GetExecutionsTotals(ctx context.Context, filter ...Filter) (totals testkube.ExecutionsTotals, err error)
- func (r *MongoRepository) GetLatestByTestSuite(ctx context.Context, testSuiteName, sortField string) (result testkube.TestSuiteExecution, err error)
- func (r *MongoRepository) GetLatestByTestSuites(ctx context.Context, testSuiteNames []string, sortField string) (executions []testkube.TestSuiteExecution, err error)
- func (r *MongoRepository) GetNewestExecutions(ctx context.Context, limit int) (result []testkube.TestSuiteExecution, err error)
- func (r *MongoRepository) GetTestSuiteMetrics(ctx context.Context, name string, limit, last int) (metrics testkube.ExecutionsMetrics, err error)
- func (r *MongoRepository) Insert(ctx context.Context, result testkube.TestSuiteExecution) (err error)
- func (r *MongoRepository) StartExecution(ctx context.Context, id string, startTime time.Time) (err error)
- func (r *MongoRepository) Update(ctx context.Context, result testkube.TestSuiteExecution) (err error)
- type Repository
Constants ¶
const CollectionName = "testresults"
const PageDefaultLimit int = 100
Variables ¶
This section is empty.
Functions ¶
func NewExecutionsFilter ¶
func NewExecutionsFilter() *filter
Types ¶
type Filter ¶
type Filter interface { Name() string NameDefined() bool LastNDays() int LastNDaysDefined() bool StartDate() time.Time StartDateDefined() bool EndDate() time.Time EndDateDefined() bool Statuses() testkube.TestSuiteExecutionStatuses StatusesDefined() bool Page() int PageSize() int TextSearchDefined() bool TextSearch() string Selector() string }
type MockRepository ¶
type MockRepository struct {
// contains filtered or unexported fields
}
MockRepository is a mock of Repository interface.
func NewMockRepository ¶
func NewMockRepository(ctrl *gomock.Controller) *MockRepository
NewMockRepository creates a new mock instance.
func (*MockRepository) DeleteAll ¶
func (m *MockRepository) DeleteAll(arg0 context.Context) error
DeleteAll mocks base method.
func (*MockRepository) DeleteByTestSuite ¶
func (m *MockRepository) DeleteByTestSuite(arg0 context.Context, arg1 string) error
DeleteByTestSuite mocks base method.
func (*MockRepository) DeleteByTestSuites ¶
func (m *MockRepository) DeleteByTestSuites(arg0 context.Context, arg1 []string) error
DeleteByTestSuites mocks base method.
func (*MockRepository) EXPECT ¶
func (m *MockRepository) EXPECT() *MockRepositoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockRepository) EndExecution ¶
func (m *MockRepository) EndExecution(arg0 context.Context, arg1 testkube.TestSuiteExecution) error
EndExecution mocks base method.
func (*MockRepository) Get ¶
func (m *MockRepository) Get(arg0 context.Context, arg1 string) (testkube.TestSuiteExecution, error)
Get mocks base method.
func (*MockRepository) GetByNameAndTestSuite ¶
func (m *MockRepository) GetByNameAndTestSuite(arg0 context.Context, arg1, arg2 string) (testkube.TestSuiteExecution, error)
GetByNameAndTestSuite mocks base method.
func (*MockRepository) GetExecutions ¶
func (m *MockRepository) GetExecutions(arg0 context.Context, arg1 Filter) ([]testkube.TestSuiteExecution, error)
GetExecutions mocks base method.
func (*MockRepository) GetExecutionsTotals ¶
func (m *MockRepository) GetExecutionsTotals(arg0 context.Context, arg1 ...Filter) (testkube.ExecutionsTotals, error)
GetExecutionsTotals mocks base method.
func (*MockRepository) GetLatestByTestSuite ¶
func (m *MockRepository) GetLatestByTestSuite(arg0 context.Context, arg1, arg2 string) (testkube.TestSuiteExecution, error)
GetLatestByTestSuite mocks base method.
func (*MockRepository) GetLatestByTestSuites ¶
func (m *MockRepository) GetLatestByTestSuites(arg0 context.Context, arg1 []string, arg2 string) ([]testkube.TestSuiteExecution, error)
GetLatestByTestSuites mocks base method.
func (*MockRepository) GetTestSuiteMetrics ¶
func (m *MockRepository) GetTestSuiteMetrics(arg0 context.Context, arg1 string, arg2, arg3 int) (testkube.ExecutionsMetrics, error)
GetTestSuiteMetrics mocks base method.
func (*MockRepository) Insert ¶
func (m *MockRepository) Insert(arg0 context.Context, arg1 testkube.TestSuiteExecution) error
Insert mocks base method.
func (*MockRepository) StartExecution ¶
StartExecution mocks base method.
func (*MockRepository) Update ¶
func (m *MockRepository) Update(arg0 context.Context, arg1 testkube.TestSuiteExecution) error
Update mocks base method.
type MockRepositoryMockRecorder ¶
type MockRepositoryMockRecorder struct {
// contains filtered or unexported fields
}
MockRepositoryMockRecorder is the mock recorder for MockRepository.
func (*MockRepositoryMockRecorder) DeleteAll ¶
func (mr *MockRepositoryMockRecorder) DeleteAll(arg0 interface{}) *gomock.Call
DeleteAll indicates an expected call of DeleteAll.
func (*MockRepositoryMockRecorder) DeleteByTestSuite ¶
func (mr *MockRepositoryMockRecorder) DeleteByTestSuite(arg0, arg1 interface{}) *gomock.Call
DeleteByTestSuite indicates an expected call of DeleteByTestSuite.
func (*MockRepositoryMockRecorder) DeleteByTestSuites ¶
func (mr *MockRepositoryMockRecorder) DeleteByTestSuites(arg0, arg1 interface{}) *gomock.Call
DeleteByTestSuites indicates an expected call of DeleteByTestSuites.
func (*MockRepositoryMockRecorder) EndExecution ¶
func (mr *MockRepositoryMockRecorder) EndExecution(arg0, arg1 interface{}) *gomock.Call
EndExecution indicates an expected call of EndExecution.
func (*MockRepositoryMockRecorder) Get ¶
func (mr *MockRepositoryMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call
Get indicates an expected call of Get.
func (*MockRepositoryMockRecorder) GetByNameAndTestSuite ¶
func (mr *MockRepositoryMockRecorder) GetByNameAndTestSuite(arg0, arg1, arg2 interface{}) *gomock.Call
GetByNameAndTestSuite indicates an expected call of GetByNameAndTestSuite.
func (*MockRepositoryMockRecorder) GetExecutions ¶
func (mr *MockRepositoryMockRecorder) GetExecutions(arg0, arg1 interface{}) *gomock.Call
GetExecutions indicates an expected call of GetExecutions.
func (*MockRepositoryMockRecorder) GetExecutionsTotals ¶
func (mr *MockRepositoryMockRecorder) GetExecutionsTotals(arg0 interface{}, arg1 ...interface{}) *gomock.Call
GetExecutionsTotals indicates an expected call of GetExecutionsTotals.
func (*MockRepositoryMockRecorder) GetLatestByTestSuite ¶
func (mr *MockRepositoryMockRecorder) GetLatestByTestSuite(arg0, arg1, arg2 interface{}) *gomock.Call
GetLatestByTestSuite indicates an expected call of GetLatestByTestSuite.
func (*MockRepositoryMockRecorder) GetLatestByTestSuites ¶
func (mr *MockRepositoryMockRecorder) GetLatestByTestSuites(arg0, arg1, arg2 interface{}) *gomock.Call
GetLatestByTestSuites indicates an expected call of GetLatestByTestSuites.
func (*MockRepositoryMockRecorder) GetTestSuiteMetrics ¶
func (mr *MockRepositoryMockRecorder) GetTestSuiteMetrics(arg0, arg1, arg2, arg3 interface{}) *gomock.Call
GetTestSuiteMetrics indicates an expected call of GetTestSuiteMetrics.
func (*MockRepositoryMockRecorder) Insert ¶
func (mr *MockRepositoryMockRecorder) Insert(arg0, arg1 interface{}) *gomock.Call
Insert indicates an expected call of Insert.
func (*MockRepositoryMockRecorder) StartExecution ¶
func (mr *MockRepositoryMockRecorder) StartExecution(arg0, arg1, arg2 interface{}) *gomock.Call
StartExecution indicates an expected call of StartExecution.
func (*MockRepositoryMockRecorder) Update ¶
func (mr *MockRepositoryMockRecorder) Update(arg0, arg1 interface{}) *gomock.Call
Update indicates an expected call of Update.
type MongoRepository ¶
type MongoRepository struct { Coll *mongo.Collection // contains filtered or unexported fields }
func NewMongoRespository ¶
func NewMongoRespository(db *mongo.Database, allowDiskUse bool) *MongoRepository
func (*MongoRepository) DeleteAll ¶
func (r *MongoRepository) DeleteAll(ctx context.Context) (err error)
DeleteAll deletes all execution results
func (*MongoRepository) DeleteByTestSuite ¶
func (r *MongoRepository) DeleteByTestSuite(ctx context.Context, testSuiteName string) (err error)
DeleteByTest deletes execution results by test suite
func (*MongoRepository) DeleteByTestSuites ¶
func (r *MongoRepository) DeleteByTestSuites(ctx context.Context, testSuiteNames []string) (err error)
DeleteByTestSuites deletes execution results by test suites
func (*MongoRepository) EndExecution ¶
func (r *MongoRepository) EndExecution(ctx context.Context, e testkube.TestSuiteExecution) (err error)
EndExecution updates execution end time
func (*MongoRepository) Get ¶
func (r *MongoRepository) Get(ctx context.Context, id string) (result testkube.TestSuiteExecution, err error)
func (*MongoRepository) GetByNameAndTestSuite ¶
func (r *MongoRepository) GetByNameAndTestSuite(ctx context.Context, name, testSuiteName string) (result testkube.TestSuiteExecution, err error)
func (*MongoRepository) GetExecutions ¶
func (r *MongoRepository) GetExecutions(ctx context.Context, filter Filter) (result []testkube.TestSuiteExecution, err error)
func (*MongoRepository) GetExecutionsTotals ¶
func (r *MongoRepository) GetExecutionsTotals(ctx context.Context, filter ...Filter) (totals testkube.ExecutionsTotals, err error)
func (*MongoRepository) GetLatestByTestSuite ¶
func (r *MongoRepository) GetLatestByTestSuite(ctx context.Context, testSuiteName, sortField string) (result testkube.TestSuiteExecution, err error)
func (*MongoRepository) GetLatestByTestSuites ¶
func (r *MongoRepository) GetLatestByTestSuites(ctx context.Context, testSuiteNames []string, sortField string) (executions []testkube.TestSuiteExecution, err error)
func (*MongoRepository) GetNewestExecutions ¶
func (r *MongoRepository) GetNewestExecutions(ctx context.Context, limit int) (result []testkube.TestSuiteExecution, err error)
func (*MongoRepository) GetTestSuiteMetrics ¶
func (r *MongoRepository) GetTestSuiteMetrics(ctx context.Context, name string, limit, last int) (metrics testkube.ExecutionsMetrics, err error)
GetTestSuiteMetrics returns test executions metrics
func (*MongoRepository) Insert ¶
func (r *MongoRepository) Insert(ctx context.Context, result testkube.TestSuiteExecution) (err error)
func (*MongoRepository) StartExecution ¶
func (r *MongoRepository) StartExecution(ctx context.Context, id string, startTime time.Time) (err error)
StartExecution updates execution start time
func (*MongoRepository) Update ¶
func (r *MongoRepository) Update(ctx context.Context, result testkube.TestSuiteExecution) (err error)
type Repository ¶
type Repository interface { // Get gets execution result by id or name Get(ctx context.Context, id string) (testkube.TestSuiteExecution, error) // GetByNameAndTestSuite gets execution result by name GetByNameAndTestSuite(ctx context.Context, name, testSuiteName string) (testkube.TestSuiteExecution, error) // GetLatestByTestSuite gets latest execution result by test suite GetLatestByTestSuite(ctx context.Context, testSuiteName, sortField string) (testkube.TestSuiteExecution, error) // GetLatestByTestSuites gets latest execution results by test suite names GetLatestByTestSuites(ctx context.Context, testSuiteNames []string, sortField string) (executions []testkube.TestSuiteExecution, err error) // GetExecutionsTotals gets executions total stats using a filter, use filter with no data for all GetExecutionsTotals(ctx context.Context, filter ...Filter) (totals testkube.ExecutionsTotals, err error) // GetExecutions gets executions using a filter, use filter with no data for all GetExecutions(ctx context.Context, filter Filter) ([]testkube.TestSuiteExecution, error) // Insert inserts new execution result Insert(ctx context.Context, result testkube.TestSuiteExecution) error // Update updates execution result Update(ctx context.Context, result testkube.TestSuiteExecution) error // StartExecution updates execution start time StartExecution(ctx context.Context, id string, startTime time.Time) error // EndExecution updates execution end time EndExecution(ctx context.Context, execution testkube.TestSuiteExecution) error // DeleteByTestSuite deletes execution results by test suite DeleteByTestSuite(ctx context.Context, testSuiteName string) error // DeleteAll deletes all execution results DeleteAll(ctx context.Context) error // DeleteByTestSuites deletes execution results by test suites DeleteByTestSuites(ctx context.Context, testSuiteNames []string) (err error) GetTestSuiteMetrics(ctx context.Context, name string, limit, last int) (metrics testkube.ExecutionsMetrics, err error) }
nolint