validations

package
v1.65.4 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: Apache-2.0 Imports: 14 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
	GetNamespaces()
	GetResources() models.IstioConfigList
}

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) FindAuthorizationPolicy added in v1.42.0

func (l YamlFixtureLoader) FindAuthorizationPolicy(name, namespace string) *security_v1beta.AuthorizationPolicy

func (YamlFixtureLoader) FindDestinationRule added in v1.42.0

func (l YamlFixtureLoader) FindDestinationRule(name, namespace string) *networking_v1beta1.DestinationRule

func (YamlFixtureLoader) FindDestinationRuleIn added in v1.42.0

func (l YamlFixtureLoader) FindDestinationRuleIn(namespace string) []*networking_v1beta1.DestinationRule

func (YamlFixtureLoader) FindDestinationRuleNotIn added in v1.42.0

func (l YamlFixtureLoader) FindDestinationRuleNotIn(namespace string) []*networking_v1beta1.DestinationRule

func (YamlFixtureLoader) FindPeerAuthentication added in v1.48.0

func (l YamlFixtureLoader) FindPeerAuthentication(name, namespace string) *security_v1beta.PeerAuthentication

func (YamlFixtureLoader) FindPeerAuthenticationIn added in v1.42.0

func (l YamlFixtureLoader) FindPeerAuthenticationIn(namespace string) []*security_v1beta.PeerAuthentication

func (YamlFixtureLoader) FindPeerAuthenticationNotIn added in v1.42.0

func (l YamlFixtureLoader) FindPeerAuthenticationNotIn(namespace string) []*security_v1beta.PeerAuthentication

func (YamlFixtureLoader) FindServiceEntry added in v1.43.0

func (l YamlFixtureLoader) FindServiceEntry(name, namespace string) *networking_v1beta1.ServiceEntry

func (YamlFixtureLoader) FindSidecar added in v1.48.0

func (l YamlFixtureLoader) FindSidecar(name, namespace string) *networking_v1beta1.Sidecar

func (YamlFixtureLoader) FindVirtualService added in v1.42.0

func (l YamlFixtureLoader) FindVirtualService(name, namespace string) *networking_v1beta1.VirtualService

func (YamlFixtureLoader) FindVirtualServiceIn added in v1.47.0

func (l YamlFixtureLoader) FindVirtualServiceIn(namespace string) []*networking_v1beta1.VirtualService

func (YamlFixtureLoader) FindWorkloadEntry added in v1.43.0

func (l YamlFixtureLoader) FindWorkloadEntry(name, namespace string) *networking_v1beta1.WorkloadEntry

func (YamlFixtureLoader) GetNamespaces added in v1.42.0

func (l YamlFixtureLoader) GetNamespaces() []core_v1.Namespace

func (YamlFixtureLoader) GetResources

func (l YamlFixtureLoader) GetResources() models.IstioConfigList

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