runner

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2022 License: Apache-2.0 Imports: 14 Imported by: 3

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

Run executes the Rego tests for the given policies.

Jump to

Keyboard shortcuts

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