functional

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: UPL-1.0 Imports: 52 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetApiAccessPolicy

func GetApiAccessPolicy() *servicemeshapi.AccessPolicy

func GetApiIngressGateway

func GetApiIngressGateway() *servicemeshapi.IngressGateway

func GetApiIngressGatewayDeployment

func GetApiIngressGatewayDeployment() *servicemeshapi.IngressGatewayDeployment

func GetApiIngressGatewayRouteTable

func GetApiIngressGatewayRouteTable() *servicemeshapi.IngressGatewayRouteTable

func GetApiMesh

func GetApiMesh() *servicemeshapi.Mesh

func GetApiVirtualDeployment

func GetApiVirtualDeployment() *servicemeshapi.VirtualDeployment

func GetApiVirtualDeploymentBinding

func GetApiVirtualDeploymentBinding() *servicemeshapi.VirtualDeploymentBinding

func GetApiVirtualService

func GetApiVirtualService() *servicemeshapi.VirtualService

func GetApiVirtualServiceRouteTable

func GetApiVirtualServiceRouteTable() *servicemeshapi.VirtualServiceRouteTable

func GetConfigMap

func GetConfigMap() *corev1.ConfigMap

func GetPod

func GetPod() *corev1.Pod

func GetSdkMesh

func GetSdkMesh(state sdk.MeshLifecycleStateEnum) *sdk.Mesh

func GetService

func GetService() *corev1.Service

func GetSidecarInjectNamespace

func GetSidecarInjectNamespace() *corev1.Namespace

Types

type Framework

type Framework struct {
	// k8s controller-runtime client is used in most of the controller operations.
	K8sClient client.Client
	// k8s client-go client set is needed when additional k8s operations are involved in tests.
	K8sClientset kubernetes.Interface
	// k8sAPIs supports kube-apiserver CRUD operations for each kind of resource.
	K8sAPIs    testK8s.K8sAPIs
	MeshClient *mocks.MockServiceMeshClient
	Log        logr.Logger
}

Framework supports common operations used by integration tests. It comes with a K8sClient, K8sClientset and K8sAPIs. It uses a mock MeshClient(ControlPlane) by default.

func (*Framework) Cleanup

func (f *Framework) Cleanup()

func (*Framework) CreateNamespace

func (f *Framework) CreateNamespace(ctx context.Context, namespaceName string)

func (*Framework) DeleteNamespace

func (f *Framework) DeleteNamespace(ctx context.Context, namespaceName string)

DeleteNamespace TODO: Fix the namespace deletion error. Namespace is in terminating state after deletion because it fails to delete the finalizer "kubernetes"

type TestEnvFramework

type TestEnvFramework interface {
	SetupTestEnv() (*envtest.Environment, *rest.Config)
	CleanUpTestEnv(testEnv *envtest.Environment)
	SetupTestFramework(t *testing.T, config *rest.Config) *Framework
	CleanUpTestFramework(framework *Framework)
}

func NewDefaultTestEnvFramework

func NewDefaultTestEnvFramework() TestEnvFramework

Jump to

Keyboard shortcuts

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