Documentation
¶
Overview ¶
Package runner executes check runners and collects results.
Index ¶
- func KillRunning()
- func ProfileChecks(mas *spec.MAS, profileName string) ([]spec.CheckRunner, error)
- func RefPath(ref spec.Ref) string
- func RunBudgets(budgets []spec.Budget) []evidence.BudgetResult
- func RunChecks(checks []spec.CheckRunner) []evidence.CheckResult
- func RunContracts(contracts []spec.Contract) []evidence.ContractResult
- func RunContractsWith(contracts []spec.Contract, opts ContractOptions) []evidence.ContractResult
- func RunPolicy(policy *spec.Policy, scope PolicyScope) []evidence.PolicyResult
- func RunProfileChecks(mas *spec.MAS, profileName string) ([]evidence.CheckResult, error)
- func RunRefs(refs []spec.Ref) []evidence.RefResult
- func SelectBudgets(budgets []spec.Budget, selectedBy string, selectors []string) ([]spec.Budget, error)
- func SelectContracts(contracts []spec.Contract, selectedBy string, selectors []string) ([]spec.Contract, error)
- type ContractOptions
- type PolicyScope
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KillRunning ¶ added in v0.10.0
func KillRunning()
KillRunning kills the process group of every step still running, and of any that starts afterwards, for use when Maslow is interrupted.
func ProfileChecks ¶ added in v0.10.0
ProfileChecks returns the spec's checks that the profile selects, in spec order.
func RefPath ¶ added in v0.10.0
refPath returns the best path/identifier for a ref. RefPath names a ref the way its result does in the evidence.
func RunBudgets ¶
func RunBudgets(budgets []spec.Budget) []evidence.BudgetResult
RunBudgets evaluates all budget constraints and returns results.
func RunChecks ¶
func RunChecks(checks []spec.CheckRunner) []evidence.CheckResult
RunChecks executes the given check runners and returns results.
func RunContracts ¶
func RunContracts(contracts []spec.Contract) []evidence.ContractResult
RunContracts executes all contract scenarios and returns results.
func RunContractsWith ¶ added in v0.7.0
func RunContractsWith(contracts []spec.Contract, opts ContractOptions) []evidence.ContractResult
RunContractsWith executes all contract scenarios under opts.
func RunPolicy ¶
func RunPolicy(policy *spec.Policy, scope PolicyScope) []evidence.PolicyResult
RunPolicy evaluates policy rules and returns results.
func RunProfileChecks ¶
RunProfileChecks executes only the checks matching the given profile.
func SelectBudgets ¶
func SelectBudgets(budgets []spec.Budget, selectedBy string, selectors []string) ([]spec.Budget, error)
SelectBudgets returns the budgets a profile selects by name or tag. A nil selector selects every budget.
func SelectContracts ¶
func SelectContracts(contracts []spec.Contract, selectedBy string, selectors []string) ([]spec.Contract, error)
SelectContracts returns the contracts selected by name or tag; selectedBy names the spec location doing the selecting, for errors. A nil selector selects every contract.
Types ¶
type ContractOptions ¶ added in v0.7.0
type ContractOptions struct {
// BaseURL, when set, replaces every contract's base_url, so the same
// scenarios can run against a deployed service.
BaseURL string
// Dir, when set, is where CLI steps run, so the same scenarios can run
// against another checkout such as the base commit.
Dir string
// contains filtered or unexported fields
}
ContractOptions changes where contracts run.
type PolicyScope ¶
type PolicyScope struct {
Dir string
BaseSHA string
// SpecPath and SpecFromBase report a spec edited on this branch when the
// run verified against the base commit's spec.
SpecPath string
SpecFromBase bool
// SpecAddedOnBranch reports that the base had no spec, so the branch's
// own spec was verified and a person must accept it.
SpecAddedOnBranch bool
}
PolicyScope says which repository policy is judged in and against what. With an empty BaseSHA only uncommitted changes count as changes.