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
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 {
Policy []string
Data []string
Output string
NoColor bool `mapstructure:"no-color"`
Trace bool
Report string
}
VerifyRunner is the runner for the Verify command, executing Rego policy unit-tests.
func (*VerifyRunner) IsReportOptionOn ¶ added in v0.26.0
func (r *VerifyRunner) IsReportOptionOn() bool
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.