The following assume you have a working developer environment with all the dependencies listed in ./dependencies.md available to you.
export INTEGRATION_USE_NGINZ=1; ./services/start-services-only.sh
Open your browser at:
Swagger json (for swagger 2.0 endpoints) is available under http://localhost:8080/api/swagger.json
kubectlavailable on your PATH
The process consists of:
services/brig/test/integration/API/Federation/End2End.hs for the current multi-backend tests.
Note that they only run if
INTEGRATION_FEDERATION_TESTS is set to
1. This is currently configured to be OFF when running regular brig integration tests (e.g. via
make -C services/brig integration) but is by default ON when running tests on kubernetes or on CI, or when using the
Decide which code you would like to use for these tests by setting the
DOCKER_TAG environment variable. The following options are detailed in the subsections below.
First, find the latest CI-compiled code made available as docker images:
# Run all commands from the top directory of wire-server make latest-tag
Output might be
./hack/bin/find-latest-docker-tag.sh latest tag for brig: 2.104.11 latest tag for nginz: 2.104.11
Let's assume the tags are the same(*) for both, then export an environment variable:
make latest-tag gives different tags for brig and nginz:
Note: CI already runs multi-backend federation integration tests on your PR, so this section may not be often useful in practice. This is still documented for completeness and to help understand the relation between source code and compiled docker images on CI.
Check CI for the latest tag that has been created on your PR (expect this to take at least 30-60 minutes from the last time you pushed to your branch). Example:
Look at a successful job in the
wire-server-pr pipeline from a job build matching your desired PR and commit hash. Then, find the actual docker tag used.
# PR 1438 commit 7a183b2dbcf019df1af3d3b97604edac72eca762 translates to export DOCKER_TAG=0.0.1-pr.3684
This can be useful to get quicker feedback while working on multi-backend code or configuration (e.g. helm charts) than to wait an hour for CI. This allows you to test code without uploading it to github and waiting an hour for CI.
FUTUREWORK: this process is in development (update this section after it's confirmed to work):
buildahis available on your system.
make buildah-docker. This will try to upload the images into a
kindcluster. If you'd prefer uploading images to quay.io, you can run it with
make buildah-docker BUILDAH_PUSH=1 BUILDAH_KIND_LOAD=0
NOTE: debug this process further as some images (e.g. nginz) are missing from the default buildah steps.
Once you have chosen the code to test and set
DOCKER_TAG accordingly, run the following, which will create two full installations of wire-server on the kubernetes cluster you've configured to connect to, and should take ~10 minutes.
Next, you can choose to either run all integration tests, which also includes running the multi-backend integration tests by default. Or you can instead choose to only run the multi-backend tests.
make -C services/brig fast
telepresenceinstalled (see developer dependencies documentation)
Note that this runs your locally compiled
brig-integration, so this allows to easily change test code locally with the following process:
make -C services/brig fast