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:
make run-tests TEST_PKG=test/e2e
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 ¶
- func ClearEnv(ctx context.Context) error
- func ClearSingleClusterEnv(ctx context.Context) error
- type Env
- type KubeContext
- func (k *KubeContext) CreateNamespace(ctx context.Context, ns string)
- func (k *KubeContext) Curl(ctx context.Context, ns, fromDeployment, fromContainer, url string) string
- func (k *KubeContext) DeleteNamespace(ctx context.Context, ns string)
- func (k *KubeContext) DeployBookInfo(ctx context.Context, ns string)
- func (k *KubeContext) DisableContainer(ctx context.Context, ns string, deploymentName string, containerName string)
- func (k *KubeContext) EnableContainer(ctx context.Context, ns string, deploymentName string)
- func (k *KubeContext) GetPod(ctx context.Context, ns, app string) *Pod
- func (k *KubeContext) LabelNamespace(ctx context.Context, ns, label string)
- func (k *KubeContext) SetDeploymentEnvVars(ctx context.Context, ns string, deploymentName string, containerName string, ...)
- func (k *KubeContext) WaitForRollout(ctx context.Context, ns, deployment string)
- type Pod
- type SingleClusterEnv
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearSingleClusterEnv ¶
func ClearSingleClusterEnv(ctx context.Context) error
Types ¶
type Env ¶
type Env struct {
Management KubeContext
Remote KubeContext
}
func StartEnvOnce ¶
func StartEnvOnce(ctx context.Context) Env
type KubeContext ¶
type KubeContext struct {
Context string
Config *rest.Config
Clientset *kubernetes.Clientset
TrafficPolicyClient networkingv1alpha2.TrafficPolicyClient
MeshClient discoveryv1alpha2.MeshClient
SecretClient kubernetes_core.SecretClient
VirtualMeshClient networkingv1alpha2.VirtualMeshClient
DestinationRuleClient istionetworkingv1alpha3.DestinationRuleClient
VirtualServiceClient istionetworkingv1alpha3.VirtualServiceClient
}
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) 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 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