Federation testing for a buddcloud server setup.
The Buddycloud channel server has over 700 unit tests which helps us have a high level of confidence when rolling out updates to production (please_feel_free_to_contribute_more!). That said, some things can't, or are more easily, tested via integration tests. This is where this suite kicks in.
The job of this set up is to run up several Buddycloud channel servers connected to an XMPP server and fire messages at the server and to check that responses are as expected. Running up several servers also allows us to check that federation is working too.
Primarily this setup is designed to be run on travisci on commit to the master branch of the Buddycloud channel server and may eventually be integrated into a bigger test suite (before the docker image is generated for example).
You will need:
This project also has an automated docker build which you can use, rather than installing all the parts onto your system. To use the docker image run the following:
docker run -d --name buddycloud-integration-tests -p 5432:5432 -p 5222:5222 -p 5347:5347 buddycloud/integration-testing
If you are running postgresql or an XMPP server locally then you'll probably want to change those port mappings and use the XMPP_PORT and DATABASE_PORT environment variables.
You'll also need to set:
export DATABASE_HOST=localdocker (or similar)export DATABASE_USER=dockerexport DATABASE_PASSWORD=dockerYou'll then need to set up some databases and configuration files:
setup-buddycloud.sh script in the resources directorysetup-database.sh in the resources directory. If your postgres server is not on localhost then set an environment variable of DATABASE_HOST to point to its location, additionally a non-standard port number use DATABASE_PORTNODE_ENV environment variable (defaults to development)Then...
# install dependencies
npm i .
# run the tests
npm test
# profit
Note: To see more details on the running tests run as follows:
DEBUG=tests* npm test
If not using localhost or a different xmpp client port number then you'll need to set XMPP_HOST and XMPP_PORT environment variables.
TBC
Content type
Image
Digest
sha256:5948911e6…
Size
103.5 MB
Last updated
almost 11 years ago
docker pull buddycloud/integration-testing