validations

package
v1.40.0-snapshot.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfirmIstioCheckMessage

func ConfirmIstioCheckMessage(expectedIstioCheckKey string, actualIstioCheck *models.IstioCheck) error

ConfirmIstioCheckMessage can be used by the validation tests to confirm the Istio Check received is what was expected

Types

type FixtureLoader

type FixtureLoader interface {
	Load() error
	GetResources(kind string) kubernetes.IstioObjectList
}

type IstioCheckTestAsserter

type IstioCheckTestAsserter struct {
	T           *testing.T
	Validations []*models.IstioCheck
	Valid       bool
}

func (IstioCheckTestAsserter) AssertNoValidations

func (tb IstioCheckTestAsserter) AssertNoValidations()

func (IstioCheckTestAsserter) AssertValidationAt

func (tb IstioCheckTestAsserter) AssertValidationAt(i int, severity models.SeverityLevel, path, message string)

func (IstioCheckTestAsserter) AssertValidationsPresent

func (tb IstioCheckTestAsserter) AssertValidationsPresent(count int, valid bool)

type ValidationsTestAsserter

type ValidationsTestAsserter struct {
	T           *testing.T
	Validations models.IstioValidations
}

func (ValidationsTestAsserter) AssertNoValidations

func (vta ValidationsTestAsserter) AssertNoValidations()

func (ValidationsTestAsserter) AssertValidationAt

func (vta ValidationsTestAsserter) AssertValidationAt(key models.IstioValidationKey, severity models.SeverityLevel, path, message string)

func (ValidationsTestAsserter) AssertValidationsPresent

func (vta ValidationsTestAsserter) AssertValidationsPresent(count int)

type YamlFixtureLoader

type YamlFixtureLoader struct {
	Filename string
	// contains filtered or unexported fields
}

func (YamlFixtureLoader) GetAllResources

func (l YamlFixtureLoader) GetAllResources() []kubernetes.IstioObject

func (YamlFixtureLoader) GetFirstResource

func (l YamlFixtureLoader) GetFirstResource(kind string) kubernetes.IstioObject

func (YamlFixtureLoader) GetResource

func (l YamlFixtureLoader) GetResource(kind, name, namespace string) kubernetes.IstioObject

func (YamlFixtureLoader) GetResources

func (l YamlFixtureLoader) GetResources(kind string) []kubernetes.IstioObject

func (YamlFixtureLoader) GetResourcesIn

func (l YamlFixtureLoader) GetResourcesIn(kind, namespace string) []kubernetes.IstioObject

func (YamlFixtureLoader) GetResourcesMatching

func (l YamlFixtureLoader) GetResourcesMatching(kind string, match func(resource kubernetes.IstioObject) bool) []kubernetes.IstioObject

func (YamlFixtureLoader) GetResourcesNotIn

func (l YamlFixtureLoader) GetResourcesNotIn(kind, namespace string) []kubernetes.IstioObject

func (*YamlFixtureLoader) Load

func (l *YamlFixtureLoader) Load() error

Jump to

Keyboard shortcuts

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