testrunner

package
v0.0.0-...-ed06964 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResourceName       = "TestRunner"
	ResourceNamePlural = "TestRunners"
)

Variables

View Source
var DefaultTestRunner = TestRunner{
	ID:   id.ID("current"),
	Name: "default",
	RequiredGates: []RequiredGate{
		RequiredGateTestSpecs,
		RequiredGateAnalyzerRules,
		RequiredGateAnalyzerScore,
	},
}

Functions

This section is empty.

Types

type Repository

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

func NewRepository

func NewRepository(db *sql.DB) *Repository

func (*Repository) Count

func (r *Repository) Count(ctx context.Context, query string) (int, error)

func (*Repository) Create

func (r *Repository) Create(ctx context.Context, updated TestRunner) (TestRunner, error)

func (*Repository) Get

func (r *Repository) Get(ctx context.Context, id id.ID) (TestRunner, error)

func (*Repository) GetDefault

func (r *Repository) GetDefault(ctx context.Context) TestRunner

func (*Repository) List

func (r *Repository) List(ctx context.Context, take, skip int, query, sortBy, sortDirection string) ([]TestRunner, error)

func (*Repository) Provision

func (r *Repository) Provision(ctx context.Context, testRunner TestRunner) error

func (*Repository) SetID

func (r *Repository) SetID(testRunner TestRunner, id id.ID) TestRunner

func (*Repository) SortingFields

func (*Repository) SortingFields() []string

func (*Repository) Update

func (r *Repository) Update(ctx context.Context, updated TestRunner) (TestRunner, error)

type RequiredGate

type RequiredGate string
var (
	RequiredGateAnalyzerScore RequiredGate = "analyzer-score"
	RequiredGateAnalyzerRules RequiredGate = "analyzer-rules"
	RequiredGateTestSpecs     RequiredGate = "test-specs"
)

type RequiredGatesResult

type RequiredGatesResult struct {
	Required []RequiredGate `json:"required"`
	Failed   []RequiredGate `json:"failed"`
	Passed   bool           `json:"passed"`
}

func NewRequiredGatesResult

func NewRequiredGatesResult(required []RequiredGate) RequiredGatesResult

func (RequiredGatesResult) OnFailed

type TestRunner

type TestRunner struct {
	ID            id.ID          `json:"id"`
	Name          string         `json:"name"`
	RequiredGates []RequiredGate `json:"requiredGates"`
}

func (TestRunner) GetID

func (pp TestRunner) GetID() id.ID

func (TestRunner) HasID

func (pp TestRunner) HasID() bool

func (TestRunner) Validate

func (ppc TestRunner) Validate() error

Jump to

Keyboard shortcuts

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