mvn test
- kubectl/oc client installed
- connected to a running kubernetes/openshift cluster
- image of operator is built with
quarkus.profile=test
and stored in any container registry - image of sync is built with
quarkus.profile=test
and stored in any container registry
example how to build and generate deployment files for your minikube
mvn package -pl operator,sync -am -Pimage-test-push --no-transfer-progress
you can also override image registry etc by mvn in case you cant to push images somewhere else
mvn package -pl operator,sync -am -Pimage-test-push --no-transfer-progress \
-Dquarkus.container-image.registry=some-registry.com \
-Dquarkus.container-image.group=my-org \
-Dquarkus.container-image.tag=latest
- suite installs latest released strimzi operator
- suite installs CRD generated by kas-fleetshard-api
- suite by default gets generated operator/sync deployments from
target/kubernetes
folders - if you want to use different deployment files run test suite with env var
YAML_BUNDLE_PATH=/custom/path
Testing with image pull secrets can done using the following steps. Note, only tests using both the operator and sync components support pull secrets. The optional properties for overriding the operand images are only necessary for those images for which you wish to tests image pull secrets.
- Build the operator image as you typically would for system tests, additionally setting the following system properties. These properties will be used to push the test images as well as configure the
kubernetes.yml
deployment files accordingly.
quarkus.container-image.registry
: registry where the images will be pushed. This registry should support authenticationquarkus.container-image.username
: username for the given registry (used to push the image only)quarkus.container-image.password
: password for the given registry (used to push the image only)quarkus.container-image.group
: the image group namequarkus.kubernetes.image-pull-secrets
: list of image pull secret names to be used. The secrets themselves are provided in step 2- (optional)
quarkus.kubernetes.env.vars."IMAGE_ADMIN_API"
: reference string of the admin server image to deploy - (optional)
quarkus.kubernetes.env.vars."IMAGE_CANARY"
: reference string of the canary image to deploy - (optional)
quarkus.kubernetes.env.vars."IMAGE_KAFKA"
: reference string of the Kafka image to deploy (via Strimzi) - (optional)
quarkus.kubernetes.env.vars."IMAGE_ZOOKEEPER"
: reference string of the ZooKeeper image to deploy (via Strimzi)
- Provide an
image-pull-secrets.yaml
(or any YAML) file at a location specified by environment variableFLEET_SHARD_PULL_SECRET_PATH
containing the pull secrets you wish to use.
mvn verify -P systemtest -pl systemtest -am
mvn verify -P systemtest -pl systemtest -Dgroups=smoke -am
mvn verify -P systemtest -pl systemtest -am -Dit.test=SmokeST#testCreateManagedKafka
mvn verify -P systemtest -pl systemtest -am -Dit.test=ManagedKafkaST,SmokeST
mvn verify -P systemtest -pl systemtest -am -Djunit.jupiter.execution.parallel.enabled=true
mvn verify -P systemtest -pl systemtest -am \
-Djunit.jupiter.execution.parallel.enabled=true \
-Djunit.jupiter.execution.parallel.config.fixed.parallelism=2