Documentation ¶
Index ¶
Constants ¶
View Source
const ( ReportFull = "full" ReportNotes = "notes" ReportFails = "fails" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestRunner ¶
type TestRunner struct { Trace bool Capabilities string Policy []string Data []string Update []string Ignore string Parser string Namespace []string AllNamespaces bool `mapstructure:"all-namespaces"` FailOnWarn bool `mapstructure:"fail-on-warn"` NoColor bool `mapstructure:"no-color"` NoFail bool `mapstructure:"no-fail"` SuppressExceptions bool `mapstructure:"suppress-exceptions"` Combine bool Output string }
TestRunner is the runner for the Test command, executing Rego policy checks against configuration files.
func (*TestRunner) Run ¶
func (t *TestRunner) Run(ctx context.Context, fileList []string) ([]output.CheckResult, error)
Run executes the TestRunner, verifying all Rego policies against the given list of configuration files.
type VerifyRunner ¶
type VerifyRunner struct { Capabilities string Policy []string Data []string Output string NoColor bool `mapstructure:"no-color"` Trace bool Report string Quiet bool }
VerifyRunner is the runner for the Verify command, executing Rego policy unit-tests.
func (*VerifyRunner) IsReportOptionOn ¶
func (r *VerifyRunner) IsReportOptionOn() bool
IsReportOptionOn returns true if the reporting option is turned on, otherwise false.
func (*VerifyRunner) Run ¶
func (r *VerifyRunner) Run(ctx context.Context) ([]output.CheckResult, []*tester.Result, error)
Run executes the Rego tests for the given policies.
Click to show internal directories.
Click to hide internal directories.