e2e

package
v1.1.0-beta11 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

README

Integration tests

This directory contains specs that test the e2e workflows of Gloo Mesh deployed on Kubernetes.

Cluster setup

The e2e tests currently run against a KIND cluster which is created via ci/setup-kind.sh. The entrypoint is contained in e2e_suite_test.go.

To run tests:

RUN_E2E=true TEST_PKG=test/e2e make run-tests 

The e2e suite will automatically run ci/setup-kind.sh and teardown the cluster on test teardown.

To reuse an existing cluster (note that the tests attempt to reach the ingress on localhost:32000) and skip the setup/teardown steps, set env USE_EXISTING=<name of kuybe context>

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearEnv

func ClearEnv(ctx context.Context) error

func ClearSingleClusterEnv

func ClearSingleClusterEnv(ctx context.Context) error

Types

type Env

type Env struct {
	Management KubeContext
	Remote     KubeContext
}

func GetEnv

func GetEnv() Env

func StartEnv

func StartEnv(ctx context.Context) Env

func StartEnvOnce

func StartEnvOnce(ctx context.Context) Env

func (Env) DumpState

func (e Env) DumpState()

type KubeContext

type KubeContext struct {
	Context                 string
	Config                  *rest.Config
	Clientset               *kubernetes.Clientset
	TrafficPolicyClient     networkingv1.TrafficPolicyClient
	MeshClient              discoveryv1.MeshClient
	DestinationClient       discoveryv1.DestinationClient
	WorkloadClient          discoveryv1.WorkloadClient
	SecretClient            kubernetes_core.SecretClient
	VirtualMeshClient       networkingv1.VirtualMeshClient
	DestinationRuleClient   istionetworkingv1alpha3.DestinationRuleClient
	VirtualServiceClient    istionetworkingv1alpha3.VirtualServiceClient
	ServiceEntryClient      istionetworkingv1alpha3.ServiceEntryClient
	AccessLogRecordClient   observabilityv1.AccessLogRecordClient
	IssuedCertificateClient certificatesv1.IssuedCertificateClient
}

func NewKubeContext

func NewKubeContext(kubecontext string) KubeContext

If kubecontext is empty string, use current context.

func (*KubeContext) CreateNamespace

func (k *KubeContext) CreateNamespace(ctx context.Context, ns string)

func (*KubeContext) Curl

func (k *KubeContext) Curl(ctx context.Context, ns, fromDeployment, fromContainer, url string) string

func (*KubeContext) DeleteNamespace

func (k *KubeContext) DeleteNamespace(ctx context.Context, ns string)

func (*KubeContext) DeployBookInfo

func (k *KubeContext) DeployBookInfo(ctx context.Context, ns string)

func (*KubeContext) DisableContainer

func (k *KubeContext) DisableContainer(
	ctx context.Context,
	ns string,
	deploymentName string,
	containerName string,
)

Modify the deployment's container entrypoint command to "sleep 20h" to disable the application.

func (*KubeContext) EnableContainer

func (k *KubeContext) EnableContainer(
	ctx context.Context,
	ns string,
	deploymentName string,
)

Remove the sleep command to re-enable the application container.

func (*KubeContext) GetPod

func (k *KubeContext) GetPod(ctx context.Context, ns, app string) *Pod

func (*KubeContext) LabelNamespace

func (k *KubeContext) LabelNamespace(ctx context.Context, ns, label string)

func (*KubeContext) SetDeploymentEnvVars

func (k *KubeContext) SetDeploymentEnvVars(
	ctx context.Context,
	ns string,
	deploymentName string,
	containerName string,
	envVars map[string]string)

func (*KubeContext) WaitForRollout

func (k *KubeContext) WaitForRollout(ctx context.Context, ns, deployment string)

type Pod

type Pod struct {
	corev1.Pod
	Cluster *KubeContext
}

func (*Pod) Curl

func (p *Pod) Curl(ctx context.Context, args ...string) string

type SingleClusterEnv

type SingleClusterEnv struct {
	Management KubeContext
}

func GetSingleClusterEnv

func GetSingleClusterEnv() SingleClusterEnv

func StartSingleClusterEnv

func StartSingleClusterEnv(ctx context.Context) SingleClusterEnv

func StartSingleClusterEnvOnce

func StartSingleClusterEnvOnce(ctx context.Context) SingleClusterEnv

func (SingleClusterEnv) DumpState

func (s SingleClusterEnv) DumpState()

Directories

Path Synopsis
istio

Jump to

Keyboard shortcuts

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