{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","params":[],"results":{"codes":[]}},"next":{"description":"","pages":[]},"title":"Running  Tests","type":"basic","slug":"running-tests","excerpt":"","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.","updates":[],"order":2,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"54fada07961fea21009206fb","githubsync":"","user":"54fa0018e7a0ba2f00306211","__v":3,"createdAt":"2015-03-07T10:59:19.026Z","project":"54fa004ff63cf9210041c3be","version":{"version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["54fa0050f63cf9210041c3c2","54fa42b3961fea210092068e","54facefd5c41173700ecf296","54fad9d5f63cf9210041c669","54fae9ed5c41173700ecf2ad"],"_id":"54fa0050f63cf9210041c3c1","__v":5,"createdAt":"2015-03-06T19:30:24.258Z","project":"54fa004ff63cf9210041c3be","releaseDate":"2015-03-06T19:30:24.258Z"},"category":{"sync":{"isSync":false,"url":""},"pages":["54fada07961fea21009206fb","54fada3d5c41173700ecf29c","54fadd49f63cf9210041c66a","54fadd895c41173700ecf2a2","54faddd35c41173700ecf2a4","54fadea0f63cf9210041c66d"],"title":"Contributing","slug":"contributing","order":4,"from_sync":false,"reference":false,"_id":"54fad9d5f63cf9210041c669","project":"54fa004ff63cf9210041c3be","__v":6,"createdAt":"2015-03-07T10:58:29.385Z","version":"54fa0050f63cf9210041c3c1"}}
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.