Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Assertion ¶
type Assertion struct { Template string DocumentIndex int Not bool AssertType string // contains filtered or unexported fields }
Assertion defines target and metrics to validate rendered result
func (*Assertion) Assert ¶
func (a *Assertion) Assert( templatesResult map[string][]common.K8sManifest, snapshotComparer validators.SnapshotComparer, renderSucceed bool, renderError error, result *results.AssertionResult, ) *results.AssertionResult
Assert validate the rendered manifests with validator
func (*Assertion) UnmarshalYAML ¶
UnmarshalYAML implement yaml.Unmalshaler, construct validator according to the assert type
type TestJob ¶
type TestJob struct { Name string `yaml:"it"` Values []string Set map[string]interface{} Template string Templates []string DocumentIndex *int `yaml:"documentIndex"` Assertions []*Assertion `yaml:"asserts"` Release struct { Name string Namespace string Revision int IsUpgrade bool `yaml:"upgrade"` } Chart struct { Version string AppVersion string `yaml:"appVersion"` } Capabilities struct { MajorVersion string `yaml:"majorVersion"` MinorVersion string `yaml:"minorVersion"` APIVersions []string `yaml:"apiVersions"` } // contains filtered or unexported fields }
TestJob definition of a test, including values and assertions
type TestRunner ¶
type TestRunner struct { Printer *printer.Printer Formatter formatter.Formatter UpdateSnapshot bool WithSubChart bool Strict bool Failfast bool TestFiles []string ValuesFiles []string OutputFile string // contains filtered or unexported fields }
TestRunner stores basic settings and testing status for running all tests
func (*TestRunner) RunV2 ¶
func (tr *TestRunner) RunV2(ChartPaths []string) bool
RunV2 test suites in chart in ChartPaths.
func (*TestRunner) RunV3 ¶
func (tr *TestRunner) RunV3(ChartPaths []string) bool
RunV3 test suites in chart in ChartPaths.
type TestSuite ¶
type TestSuite struct { Name string `yaml:"suite"` Values []string Templates []string Release struct { Name string Namespace string Revision int IsUpgrade bool `yaml:"upgrade"` } Chart struct { Version string AppVersion string `yaml:"appVersion"` } Capabilities struct { MajorVersion string `yaml:"majorVersion"` MinorVersion string `yaml:"minorVersion"` APIVersions []string `yaml:"apiVersions"` } Tests []*TestJob // contains filtered or unexported fields }
TestSuite defines scope and templates to render and tests to run
func ParseTestSuiteFile ¶
func ParseTestSuiteFile(suiteFilePath, chartRoute string, strict bool, valueFilesSet []string) (*TestSuite, error)
ParseTestSuiteFile parse a suite file at path and returns TestSuite
Click to show internal directories.
Click to hide internal directories.