{"_id":"54fada07961fea21009206fb","githubsync":"","user":"54fa0018e7a0ba2f00306211","__v":3,"project":"54fa004ff63cf9210041c3be","version":{"_id":"54fa0050f63cf9210041c3c1","__v":5,"project":"54fa004ff63cf9210041c3be","createdAt":"2015-03-06T19:30:24.258Z","releaseDate":"2015-03-06T19:30:24.258Z","categories":["54fa0050f63cf9210041c3c2","54fa42b3961fea210092068e","54facefd5c41173700ecf296","54fad9d5f63cf9210041c669","54fae9ed5c41173700ecf2ad"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"category":{"_id":"54fad9d5f63cf9210041c669","project":"54fa004ff63cf9210041c3be","__v":6,"pages":["54fada07961fea21009206fb","54fada3d5c41173700ecf29c","54fadd49f63cf9210041c66a","54fadd895c41173700ecf2a2","54faddd35c41173700ecf2a4","54fadea0f63cf9210041c66d"],"version":"54fa0050f63cf9210041c3c1","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-03-07T10:58:29.385Z","from_sync":false,"order":4,"slug":"contributing","title":"Contributing"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-03-07T10:59:19.026Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"Each Paz repository has its own tests, and there is one \"integration\" test in the main Paz repository that will deploy Paz on a Vagrant cluster and run a service on it.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Running per-Service Tests\"\n}\n[/block]\nFor each Paz service repository ([paz-orchestrator](https://github.com/paz-sh/paz-orchestrator), [paz-scheduler](https://github.com/paz-sh/paz-scheduler) and [paz-service-directory](https://github.com/paz-sh/paz-service-directory)) there exists a suite of lab tests. Some are in-process unit tests and some are external API functional tests. All are run with `npm test`.\n\nThe external API functional tests bring up a service and its dependencies as Docker containers using Fig, and tests the API from the outside. For this you will need to have Docker and Fig installed.\n\nBoot2Docker on OS/X requires an environment variable to be set so that the tests can reach the running services in the Boot2Docker VM, like so:\n\n```\n$ DOCKER_IP=192.168.59.103 npm test\n```\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Running System-Wide Tests\"\n}\n[/block]\nThere is an integration test that brings up a CoreOS Vagrant cluster, installs Paz and then runs a contrived service on it and verifies that it works. Run the following from the root directory of the [paz](https://github.com/paz-sh/paz) repository:\n\n```\n$ cd test\n$ ./integration.sh\n```\n\nEach paz repository (service directory, orchestrator, scheduler) has tests that run on paz-ci.yld.io (in StriderCD), triggered by a Github webhook.","excerpt":"","slug":"running-tests","type":"basic","title":"Running  Tests"}
Each Paz repository has its own tests, and there is one "integration" test in the main Paz repository that will deploy Paz on a Vagrant cluster and run a service on it. [block:api-header] { "type": "basic", "title": "Running per-Service Tests" } [/block] For each Paz service repository ([paz-orchestrator](https://github.com/paz-sh/paz-orchestrator), [paz-scheduler](https://github.com/paz-sh/paz-scheduler) and [paz-service-directory](https://github.com/paz-sh/paz-service-directory)) there exists a suite of lab tests. Some are in-process unit tests and some are external API functional tests. All are run with `npm test`. The external API functional tests bring up a service and its dependencies as Docker containers using Fig, and tests the API from the outside. For this you will need to have Docker and Fig installed. Boot2Docker on OS/X requires an environment variable to be set so that the tests can reach the running services in the Boot2Docker VM, like so: ``` $ DOCKER_IP=192.168.59.103 npm test ``` [block:api-header] { "type": "basic", "title": "Running System-Wide Tests" } [/block] There is an integration test that brings up a CoreOS Vagrant cluster, installs Paz and then runs a contrived service on it and verifies that it works. Run the following from the root directory of the [paz](https://github.com/paz-sh/paz) repository: ``` $ cd test $ ./integration.sh ``` Each paz repository (service directory, orchestrator, scheduler) has tests that run on paz-ci.yld.io (in StriderCD), triggered by a Github webhook.