This directory contains test suites that runs MOCO on a real Kubernetes using kind.
We adopt Test Pyramid and Test Sizes.
The end-to-end (e2e) tests are positioned at the top of the pyramid and "Large" ones.
MOCO has small and medium tests in package directories, so all packages are ensured to work by themselves. Therefore, we include the following tests in the e2e suite.
- Manifests.
- MySQL cluster lifecycle (create, update, delete).
- Access moco-agent over mTLS connections.
- Access mysqld via Services.
- Garbage collection after deleting MySQLCluster.
- Slow logs from a sidecar container.
- Metrics of
moco-controller
. kubectl-moco
plugin features.- Backup and restore features.
-
Prepare a Linux with Docker.
-
Run the following commands in this directory.
$ make start $ make test $ make test-upgrade
-
After the test, run the following command to stop
kind
cluster.$ make stop
- Prepare the source directory of moco-agent.
- Run
make start AGENT_DIR=<dir>
with the directory path of moco-agent.