Documentation
¶
Index ¶
Constants ¶
const SkipDefaultBlueprintURL = " "
SkipDefaultBlueprintURL is a sentinel for DefaultBlueprintURL that disables loading the default OCI blueprint (used in unit tests).
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestResult ¶
TestResult represents the result of running a single test case.
type TestRunner ¶
type TestRunner struct {
DefaultBlueprintURL string
RunFunc func(filter string) ([]TestResult, error)
// contains filtered or unexported fields
}
TestRunner discovers and executes blueprint composition tests.
func NewTestRunner ¶
func NewTestRunner(rt *runtime.Runtime, artifactBuilder artifact.Artifact) *TestRunner
NewTestRunner creates a new TestRunner using the provided runtime and artifact builder. It stores base dependencies for creating isolated runtime instances for each test case, ensuring test isolation.
func (*TestRunner) Run ¶
func (r *TestRunner) Run(filter string) ([]TestResult, error)
Run discovers and executes test cases, returning results for each test. If filter is provided, only tests matching the filter name are executed.
func (*TestRunner) RunAndPrint ¶
func (r *TestRunner) RunAndPrint(filter string) error
RunAndPrint discovers and executes test cases, printing results to stdout. If filter is provided, only tests matching the filter name are executed. Returns an error if tests fail or execution encounters an error.