Skip to content

Developers Guide

Eran Tamir edited this page May 6, 2019 · 8 revisions

Setting up a developer environment

Please refer to the following guides for setting up a developer environment
OSX
Linux

To start a local environment, after following the above guides, start by installing/updating your dependencies by running

npm install

from the project root.
This will bring the new npm deps, will build the native code and will call the gulp build task for the frontend component.

Make sure mongod is running or run it manually by

npm run db

then start the system by running each of the components on its own (if you choose this way, preferably in different shells)

npm run web
npm run bg
npm run hosted_agents

sudo npm run s3

Note that the s3rver listens on port 80 and needs to be run with a privileged user

Building & Testing

Building

---MISSING BUILDING---

Testing

The tests in the project are divided into four categories:

Unit tests

These are tests which can ran at any location which satisfies the developer environment requirements. They do not require a NooBaa installation to run on.
NooBaa is using mocha as its unit test framework and they are located in src/tests/unit_tests

Running unit tests on your code is as easy as running

npm test

You can also run a single test by providing its name, for example

mocha src/test/unit_tests/test_semaphore.js

would run the test_semaphore unit test

System Tests

These are tests which involve several components or end ot end flows in the system. They require a running NooBaa system (can be a local dev system) to run on.
They are located in src/tests/system_tests and can be run one after the other using the src/test/framework/runner component
For example, running

Nightly Pipeline

These are tests which ran on more complex environments, combine several flows in the system and run at higher capacities than system tests.
They are being run each night on the latest successful build by the CI orchestration (Jenkins). They are located at src/test/qa

Test Utils

The tests sometimes require specific utils (manipulating agents or server status, creating certain bucket policies etc.) These utils can be found at src/test/utils

Clone this wiki locally