testresult

package
v1.7.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package testresult is a generated GoMock package.

Index

Constants

View Source
const CollectionName = "testresults"
View Source
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 added in v1.5.33

type MockRepository struct {
	// contains filtered or unexported fields
}

MockRepository is a mock of Repository interface.

func NewMockRepository added in v1.5.33

func NewMockRepository(ctrl *gomock.Controller) *MockRepository

NewMockRepository creates a new mock instance.

func (*MockRepository) DeleteAll added in v1.5.33

func (m *MockRepository) DeleteAll(arg0 context.Context) error

DeleteAll mocks base method.

func (*MockRepository) DeleteByTestSuite added in v1.5.33

func (m *MockRepository) DeleteByTestSuite(arg0 context.Context, arg1 string) error

DeleteByTestSuite mocks base method.

func (*MockRepository) DeleteByTestSuites added in v1.5.33

func (m *MockRepository) DeleteByTestSuites(arg0 context.Context, arg1 []string) error

DeleteByTestSuites mocks base method.

func (*MockRepository) EXPECT added in v1.5.33

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockRepository) EndExecution added in v1.5.33

func (m *MockRepository) EndExecution(arg0 context.Context, arg1 testkube.TestSuiteExecution) error

EndExecution mocks base method.

func (*MockRepository) Get added in v1.5.33

Get mocks base method.

func (*MockRepository) GetByName added in v1.5.33

GetByName mocks base method.

func (*MockRepository) GetByNameAndTestSuite added in v1.5.33

func (m *MockRepository) GetByNameAndTestSuite(arg0 context.Context, arg1, arg2 string) (testkube.TestSuiteExecution, error)

GetByNameAndTestSuite mocks base method.

func (*MockRepository) GetExecutions added in v1.5.33

func (m *MockRepository) GetExecutions(arg0 context.Context, arg1 Filter) ([]testkube.TestSuiteExecution, error)

GetExecutions mocks base method.

func (*MockRepository) GetExecutionsTotals added in v1.5.33

func (m *MockRepository) GetExecutionsTotals(arg0 context.Context, arg1 ...Filter) (testkube.ExecutionsTotals, error)

GetExecutionsTotals mocks base method.

func (*MockRepository) GetLatestByTestSuite added in v1.5.33

func (m *MockRepository) GetLatestByTestSuite(arg0 context.Context, arg1, arg2 string) (testkube.TestSuiteExecution, error)

GetLatestByTestSuite mocks base method.

func (*MockRepository) GetLatestByTestSuites added in v1.5.33

func (m *MockRepository) GetLatestByTestSuites(arg0 context.Context, arg1 []string, arg2 string) ([]testkube.TestSuiteExecution, error)

GetLatestByTestSuites mocks base method.

func (*MockRepository) GetTestSuiteMetrics added in v1.5.33

func (m *MockRepository) GetTestSuiteMetrics(arg0 context.Context, arg1 string, arg2, arg3 int) (testkube.ExecutionsMetrics, error)

GetTestSuiteMetrics mocks base method.

func (*MockRepository) Insert added in v1.5.33

Insert mocks base method.

func (*MockRepository) StartExecution added in v1.5.33

func (m *MockRepository) StartExecution(arg0 context.Context, arg1 string, arg2 time.Time) error

StartExecution mocks base method.

func (*MockRepository) Update added in v1.5.33

Update mocks base method.

type MockRepositoryMockRecorder added in v1.5.33

type MockRepositoryMockRecorder struct {
	// contains filtered or unexported fields
}

MockRepositoryMockRecorder is the mock recorder for MockRepository.

func (*MockRepositoryMockRecorder) DeleteAll added in v1.5.33

func (mr *MockRepositoryMockRecorder) DeleteAll(arg0 interface{}) *gomock.Call

DeleteAll indicates an expected call of DeleteAll.

func (*MockRepositoryMockRecorder) DeleteByTestSuite added in v1.5.33

func (mr *MockRepositoryMockRecorder) DeleteByTestSuite(arg0, arg1 interface{}) *gomock.Call

DeleteByTestSuite indicates an expected call of DeleteByTestSuite.

func (*MockRepositoryMockRecorder) DeleteByTestSuites added in v1.5.33

func (mr *MockRepositoryMockRecorder) DeleteByTestSuites(arg0, arg1 interface{}) *gomock.Call

DeleteByTestSuites indicates an expected call of DeleteByTestSuites.

func (*MockRepositoryMockRecorder) EndExecution added in v1.5.33

func (mr *MockRepositoryMockRecorder) EndExecution(arg0, arg1 interface{}) *gomock.Call

EndExecution indicates an expected call of EndExecution.

func (*MockRepositoryMockRecorder) Get added in v1.5.33

func (mr *MockRepositoryMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call

Get indicates an expected call of Get.

func (*MockRepositoryMockRecorder) GetByName added in v1.5.33

func (mr *MockRepositoryMockRecorder) GetByName(arg0, arg1 interface{}) *gomock.Call

GetByName indicates an expected call of GetByName.

func (*MockRepositoryMockRecorder) GetByNameAndTestSuite added in v1.5.33

func (mr *MockRepositoryMockRecorder) GetByNameAndTestSuite(arg0, arg1, arg2 interface{}) *gomock.Call

GetByNameAndTestSuite indicates an expected call of GetByNameAndTestSuite.

func (*MockRepositoryMockRecorder) GetExecutions added in v1.5.33

func (mr *MockRepositoryMockRecorder) GetExecutions(arg0, arg1 interface{}) *gomock.Call

GetExecutions indicates an expected call of GetExecutions.

func (*MockRepositoryMockRecorder) GetExecutionsTotals added in v1.5.33

func (mr *MockRepositoryMockRecorder) GetExecutionsTotals(arg0 interface{}, arg1 ...interface{}) *gomock.Call

GetExecutionsTotals indicates an expected call of GetExecutionsTotals.

func (*MockRepositoryMockRecorder) GetLatestByTestSuite added in v1.5.33

func (mr *MockRepositoryMockRecorder) GetLatestByTestSuite(arg0, arg1, arg2 interface{}) *gomock.Call

GetLatestByTestSuite indicates an expected call of GetLatestByTestSuite.

func (*MockRepositoryMockRecorder) GetLatestByTestSuites added in v1.5.33

func (mr *MockRepositoryMockRecorder) GetLatestByTestSuites(arg0, arg1, arg2 interface{}) *gomock.Call

GetLatestByTestSuites indicates an expected call of GetLatestByTestSuites.

func (*MockRepositoryMockRecorder) GetTestSuiteMetrics added in v1.5.33

func (mr *MockRepositoryMockRecorder) GetTestSuiteMetrics(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

GetTestSuiteMetrics indicates an expected call of GetTestSuiteMetrics.

func (*MockRepositoryMockRecorder) Insert added in v1.5.33

func (mr *MockRepositoryMockRecorder) Insert(arg0, arg1 interface{}) *gomock.Call

Insert indicates an expected call of Insert.

func (*MockRepositoryMockRecorder) StartExecution added in v1.5.33

func (mr *MockRepositoryMockRecorder) StartExecution(arg0, arg1, arg2 interface{}) *gomock.Call

StartExecution indicates an expected call of StartExecution.

func (*MockRepositoryMockRecorder) Update added in v1.5.33

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 added in v1.2.14

func (r *MongoRepository) DeleteAll(ctx context.Context) (err error)

DeleteAll deletes all execution results

func (*MongoRepository) DeleteByTestSuite added in v1.2.14

func (r *MongoRepository) DeleteByTestSuite(ctx context.Context, testSuiteName string) (err error)

DeleteByTest deletes execution results by test suite

func (*MongoRepository) DeleteByTestSuites added in v1.2.14

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) GetByName added in v1.5.2

func (r *MongoRepository) GetByName(ctx context.Context, name string) (result testkube.TestSuiteExecution, err error)

func (*MongoRepository) GetByNameAndTestSuite added in v1.2.14

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 added in v1.2.14

func (r *MongoRepository) GetLatestByTestSuite(ctx context.Context, testSuiteName, sortField string) (result testkube.TestSuiteExecution, err error)

func (*MongoRepository) GetLatestByTestSuites added in v1.2.14

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 added in v1.4.5

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
	Get(ctx context.Context, id string) (testkube.TestSuiteExecution, error)
	// GetByName gets execution result by name
	GetByName(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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL