verify

package
v0.48.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SkipReasonName      = "Test name did not match the provided pattern"
	SkipReasonResource  = "Resource matched a policy that was excluded from the bundle"
	SkipReasonPrincipal = "Principal matched a policy that was excluded from the bundle"
)

Variables

This section is empty.

Functions

func Verify

func Verify(ctx context.Context, fsys fs.FS, eng Checker, conf Config) (*policyv1.TestResults, error)

Verify runs the test suites from the provided directory.

Types

type AuxData added in v0.31.0

type AuxData struct {
	LoadError error
	Fixtures  map[string]*enginev1.AuxData
	FilePath  string
}

type Checker added in v0.21.0

type Checker interface {
	Check(ctx context.Context, inputs []*enginev1.CheckInput, opts ...evaluator.CheckOpt) ([]*enginev1.CheckOutput, error)
}

type Config

type Config struct {
	ExcludedResourcePolicyFQNs  map[string]struct{}
	ExcludedPrincipalPolicyFQNs map[string]struct{}
	IncludedTestNamesRegexp     string
	Trace                       bool
}

type Principals added in v0.31.0

type Principals struct {
	LoadError error
	Fixtures  map[string]*enginev1.Principal
	Groups    map[string][]string
	FilePath  string
}

type Resources added in v0.31.0

type Resources struct {
	LoadError error
	Fixtures  map[string]*enginev1.Resource
	Groups    map[string][]string
	FilePath  string
}

type TestFixture added in v0.31.0

type TestFixture struct {
	Principals *Principals
	Resources  *Resources
	AuxData    *AuxData
}

func LoadTestFixture added in v0.31.0

func LoadTestFixture(fsys fs.FS, path string, continueOnError bool) (tf *TestFixture, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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