Documentation ¶
Overview ¶
Package check provides implementation of check functions or jobs that are used in system validation.
Base ¶
The base job implements all components of the amboy.Job interface and all common components of the greenbay.Check interface, including error handling and job processing. All checks should, typically, compose a pointer to Base.
For an example of a check that uses Base, see the test job in the "mock_check_for_test.go" file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base struct { WasSuccessful bool `bson:"passed" json:"passed" yaml:"passed"` Message string `bson:"message" json:"message" yaml:"message"` TestSuites []string `bson:"suites" json:"suites" yaml:"suites"` Timing greenbay.TimingInfo `bson:"timing" json:"timing" yaml:"timing"` *job.Base `bson:"metadata" json:"metadata" yaml:"metadata"` // contains filtered or unexported fields }
Base is a type that all new checks should compose, and provides an implementation of most common amboy.Job and greenbay.Check methods.
func (*Base) Output ¶
func (b *Base) Output() greenbay.CheckOutput
Output returns a consistent output format for greenbay.Checks, which may be useful for generating common output formats.
type GroupRequirements ¶
GroupRequirements provides a way to express expected outcomes for checks that include multiple constituent checks. (e.g. a list of files that must exist or a list of commands to run.)
func (GroupRequirements) GetResults ¶
func (gr GroupRequirements) GetResults(passes, failures int) (bool, error)
GetResults takes numbers of passed and failed tasks and reports if the check should succeed.
func (GroupRequirements) Validate ¶
func (gr GroupRequirements) Validate() error
Validate checks the GroupRequirements structure and ensures that the specified results are valid and that there are no contradictory or impossible expectations.
Source Files ¶
- base.go
- command.go
- command_group.go
- compile.go
- compile_gcc.go
- compile_golang.go
- compile_script.go
- compile_undefined.go
- container.go
- file_exists.go
- file_group_exists.go
- group_requirements.go
- init.go
- limit.go
- limit_unix.go
- package.go
- package_checker.go
- package_group.go
- program.go
- program_return.go
- python_module.go
- undefined.go
- version.go