Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContextFile ¶
type ContextFile struct {
Path string `yaml:"path"`
}
ContextFile references an external JSON or YAML file for context.
type ContextValue ¶
ContextValue is an inline context key-value pair.
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner executes test cases. All relative paths are resolved against baseDir.
type SuiteResult ¶
type SuiteResult struct {
Results []TestResult
Passed int
Failed int
Errors int
Duration time.Duration
}
SuiteResult captures the outcome of an entire test suite.
type TestCase ¶
type TestCase struct {
Name string `yaml:"name"`
Policy string `yaml:"policy"`
Expect string `yaml:"expect"` // "PASS" or "FAIL"
Subject string `yaml:"subject"`
Attestations []string `yaml:"attestations"`
Context []ContextValue `yaml:"context"`
ContextFiles []ContextFile `yaml:"context-files"`
}
TestCase defines a single policy test.
type TestResult ¶
type TestResult struct {
Name string
Expected string // "PASS" or "FAIL"
Actual string // "PASS", "FAIL", "SOFTFAIL", "ERROR"
Passed bool
Error error
Duration time.Duration
}
TestResult captures the outcome of a single test case.
type TestSuite ¶
type TestSuite struct {
Tests []TestCase `yaml:"tests"`
}
TestSuite holds all test cases loaded from a config file.
func LoadConfig ¶
LoadConfig reads, parses, and validates a test config file.
Click to show internal directories.
Click to hide internal directories.