utils

package
v1.1.0-beta5 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestManifestDir string

if TestManifestDir is set, manifests will be created here

Functions

func AssertTrafficPolicyStatuses

func AssertTrafficPolicyStatuses(
	ctx context.Context,
	trafficPolicy networkingv1.TrafficPolicyClient,
	namespace string,
)

func AssertVirtualMeshStatuses

func AssertVirtualMeshStatuses(
	ctx context.Context,
	virtualMesh networkingv1.VirtualMeshClient,
	namespace string,
)

func RunShell

func RunShell(c string)

Types

type Manifest

type Manifest struct {
	// contains filtered or unexported fields
}

func NewManifest

func NewManifest(filename string) (Manifest, error)

func (Manifest) AppendResources

func (m Manifest) AppendResources(resources ...metav1.Object) error

func (Manifest) Cleanup

func (m Manifest) Cleanup(namespace string)

Same as KubeDelete but ignore errors in case the test has already cleaned up associated resources. This method is just a safeguard for ensuring a clean test slate between unit tests.

func (Manifest) CreateOrTruncate

func (m Manifest) CreateOrTruncate() error

func (Manifest) KubeApply

func (m Manifest) KubeApply(namespace string) error

func (Manifest) KubeDelete

func (m Manifest) KubeDelete(namespace string) error

Jump to

Keyboard shortcuts

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