E2E Test Suites
All E2E test suites are run in your local environment, but all related components are run in a Kuberentes cluster, we recommend you to use Kind and we provide some simple comands
to create the Kubernetes cluster by kind quickly.
Workflow
The e2e framework sets up hooks when running each ginkgo.Describe block, the BeforeEach
hook will do the following things before the test case can be run:
- Create two namespaces, one for service mesh control plane (like Istio), the other for apps.
- Deploy the control plane, now Istio is in use, it uses modified charts to replace Envoy by apisix-mesh-agent.
- Label the app namespace so Pods inside it can be injected by control plane.
- Deploy the httpbin pod.
Extra components might be deployed inside the test case, such as deploying a Pod as the springboard to send requests.
How to run all the e2e test suites
make e2e-test
You can pass the variable E2E_CONCURRENCY
to control the concurrency.
How can I focus on one test case
Edit the target test case, changing the gingko.It
to ginkgo.FIt
or
ginkgo.Describe
to ginkgo.FDescribe
, then executing make e2e-test
.
What if the legacies are remaining due to aborted debugging
Just run the following command:
make cleanup-e2e-legacies