No description, website, or topics provided.
Clone or download
Latest commit 8fb9aad Jan 21, 2019

README.md

test-harness


This is a work in progress, so code is :lava:

Dependencies

That's alotta dependencies, I know. technically you don't need docker-compose if if you're not going to run the test harness locally. so there is that :)

installation

$ git clone https://github.com/livepeer/test-harness.git
$ cd test-harness
$ npm install

Local Mode

  1. check examples/local.js, note that in the config object local is true. note that this will use docker-compose up to run instead of docker-swarm. this is easier to debug for smallish setups locally.

  2. important edit the examples/local.js file livepeerBinaryPath value to the livepeer binary you'd like to test. this has to be built for linux

  3. run node examples/local.js to fire up the test-harness.

  4. thats it. now you got a running setup. note that in the dist folder there will be a folder for this experiment, which will contain the docker-compose generated. this will have the port forwarding for each node and should be accessible at your dev machine's localhost

GCP integrated Test-harness

  1. setup gcloud, docker-machine Google driver uses Application Default Credentials to get authorization credentials for use in calling Google APIs. follow https://cloud.google.com/sdk/docs/#deb to gcloud init.

  2. run gcloud auth login

  3. now you should have gcloud and ready to spin up instances, if you're having issues , let me know (open an issue or buzz me at discord @Yahya#0606 )

  4. there is a ready made example in /examples/index.js, Change the test name and run in node examples/index.js which will spin up a docker cluster of 2 hosts, with livepeer containers and geth with protocol ready to go

Automating Livepeer actions


this isn't complete yet. but it's functioning . checkout this example along with the comments in the code to get an idea of how to use it.