Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 821 Bytes

02 - test.md

File metadata and controls

31 lines (24 loc) · 821 Bytes

Test

KubeBlocks uses make for a variety of test actions.

Envtest

Setting up a local control plane and test all packages:

make test

Test specific packages:

# Directory `controllers` contains many packages, it will build and run each package individually.
make test TEST_PACKAGES=./controllers/...

# Test single package
make test-delve TEST_PACKAGES=./controllers/apps/...

Use existing Kubernetes cluster

make test-current-ctx

Instead of setting up a local control plane, this command will point to the control plane of an existing cluster by $HOME/.kube/config.

Check test code coverage

make test cover-report

This command will test all packages and generate a coverage report file cover.html, and open by your default browser automatically.