{"id":25716296,"url":"https://github.com/interledgerjs/five-bells-integration-test","last_synced_at":"2025-05-05T20:43:43.568Z","repository":{"id":57237576,"uuid":"51538131","full_name":"interledgerjs/five-bells-integration-test","owner":"interledgerjs","description":"A module to help with testing Five Bells components against each other","archived":false,"fork":false,"pushed_at":"2018-11-23T09:48:51.000Z","size":203,"stargazers_count":2,"open_issues_count":5,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-04T02:02:03.815Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/interledgerjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-11T18:55:36.000Z","updated_at":"2018-11-23T09:48:52.000Z","dependencies_parsed_at":"2022-08-26T14:04:18.699Z","dependency_job_id":null,"html_url":"https://github.com/interledgerjs/five-bells-integration-test","commit_stats":null,"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledgerjs%2Ffive-bells-integration-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledgerjs%2Ffive-bells-integration-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledgerjs%2Ffive-bells-integration-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledgerjs%2Ffive-bells-integration-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/interledgerjs","download_url":"https://codeload.github.com/interledgerjs/five-bells-integration-test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252573696,"owners_count":21770266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-25T14:52:47.258Z","updated_at":"2025-05-05T20:43:43.549Z","avatar_url":"https://github.com/interledgerjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# five-bells-integration-test\n\n\u003e A module to help with testing Interledger.js components against each other\n\n## Introduction\n\nThis module is used by the CI tests of the different Interledger.js components. This module is installed with each component as a dev dependency and run during continuous integration. When run, it installs the other components and then tests them against the local working tree of the current component.\n\n## Installation\n\n```sh\nnpm install --save-dev five-bells-integration-test\n```\n\n## Process\n\nWhen run this test suite will instantiate instances of `ilp-connector` and configure it with instances of `ilp-plugin-mini-accounts` or `ilp-plugin-btp` (depending on whether the environment is configured as a server or client).\n\nIt will then create necessary senders and receivers using the `STREAM` protocol and send payments through the connector(s).\n\nAll services are loaded using the `five-bells-service-manager` which provides convenience APIs for interacting with the services.\n\nThe `five-bells-integration-test-loader` is used to install and setup the test directory with the appropriate versions of dependencies. If the tests are triggered as part of the test run for a specific component then the working copy of that componenet is used. Dependencies will be fetched from the latest `master` branch OR from a branch with the same name as the component under test (if available).\n\n## Testing a component\n\nTo run the integration tests for the current version of a component ensure that the `package.json` contains the following:\n\n```json\n  \"scripts\": {\n    \"integration\": \"integration-loader \u0026\u0026 integration all\"\n  },\n  \"config\": {\n    \"five-bells-integration-test-loader\": {\n      \"module\": \"five-bells-integration-test\",\n      \"repo\": \"interledgerjs/five-bells-integration-test\"\n    }\n  },\n```\n\nRunning `npm run integration` will install the necessary components and run the tests.\n\n# TODO - Below is outdated\n\n## Usage (with Docker)\nGet the Docker image for the Five Bells integration tests,\nand save yourself a lot of configuration and slow building steps on\nyour laptop:\n```sh\ndocker pull michielbdejong/five-bells-integration-test\n```\n\nThat pulls in a certified build from Docker's hub, but if you like to\nbuild the Docker imager yourself then just do `docker build .` instead.\n\nYou are probably not so interested in seeing the integration tests run\non the master branches of the various repos as they were when this\nDocker image was built, because you can already watch that on circleci,\nbut just so you know, the command for that would be:\n```sh\ndocker run michielbdejong/five-bells-integration-test\n```\n\nSo instead, go inside the container and run the tests interactively:\n```sh\ndocker run -it --rm michielbdejong/five-bells-integration-test /bin/bash\n$ cd integration-test/ilp-kit ; git status ; git fetch origin ; git checkout origin/my-awesome-improvement-that-I-want-to-test ; cd ../..\n$ vim src/tests/index.js # add some debug statement to that failing `beforeEach` hook\n$ vim integration-test/node_modules/ilp-connector/src/lib/route-builder.js +123 # add a console.log statement to see how that error is caused\n$ ./src/bin/integration test advanced connector_first # run only the 'advanced' and 'connector_first' integration test\n$ ./src/bin/integration test # run all the integration tests\n```\n\nRepositories tested by the integration tests:\n* ilp-kit\n* ilp-kit-cli\n* ilp\n* ilp-connector\n* ilp-routing\n* ilp-plugin-virtual\n* ilp-plugin-settlement-adapter\n* ilp-plugin-bells\n* five-bells-ledger\n* five-bells-shared\n* five-bells-condition\n\nThe branch-matching done by `integration-loader` is quite nifty, although sometimes you will have to read the code to know exactly what is going on.\nRoughly, what it does is:\n* if the branch in the `/app` folder is `master`, then test all master branches against each other.\n* if the branch is something else, try to check out that branch name on the different repositories as well. This allows you to refactor across repositories!\n* when run as `npm run integration` in the ilp-kit repository (not using this Docker image), it will load appropriate the versions of components, as specified by ilp-kit's package.json file. This allows the master branches of different components to be ahead of the ilp-kit master branch, which can be useful when we are working on a big change that will break the Interledger network. Updating ilp-kit can be postponed until all the components have been tested thoroughly.\n\nTo check out a cross-repo branch, for instance `mj-currency_scale`, do the following inside the container:\n```sh\n$ cd /app\n$ git branch mj-currency_scale\n$ git checkout mj-currency_scale\n$ ./node_modules/.bin/integration-loader\n$ src/bin/integration setup\n$ cd integration-test/ilp-kit\n$ npm rebuild node-sass; npm run build # this is necessary because running npm install as root causes it to skip the postinstall hook\n$ cd ../..\n$ ps auxwww # kill any npm/node processes still running from previous runs\n$ src/bin/integration test connector_first\n$ src/bin/integration test\n```\nYou will probably need to manually keep track of which version of which package is installed in `/app/node_modules`, `/app/integration-test/node_modules`, and `/app/integration-test/ilp-kit/node_modules`\nto make sure you are testing the versions you want to. Of course, you can also still run the integration tests on circleci.com, or direcyly on your laptop, without Docker.\n\n## Usage (without Docker)\n\nIn any five-bells module which has `five-bells-integration-test` installed, simply run:\n\n``` sh\nnpm run integration\n```\n\nThis is enabled by the following config in the `package.json`:\n\n``` json\n{\n  \"scripts\": {\n    \"integration\": \"integration test\"\n  }\n}\n```\n\n## Tests\n\nThe five-bells-integration-test module can be tested on its own:\n\n```sh\nnpm install\nnpm test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterledgerjs%2Ffive-bells-integration-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finterledgerjs%2Ffive-bells-integration-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterledgerjs%2Ffive-bells-integration-test/lists"}