Docker environment to run Thorn ( to test Sugar's REST API - Blog post
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

ThornDockerized Build Status

Docker image to run Thorn ( to test Sugar's REST API

Option 1 - Basic - Running tests

Assuming the the test file sugarsample.js is located inside the local samples directory.

docker run -v ${PWD}/samples:/tests -t esimonetti/thorndockerized ./ user password /tests/sugarsample.js

It is also possible to run all tests within a directory, by passing as last parameter a directory path containing the tests, instead of a specific file name.

Note that for every execution of the Sugar sample test file provided, a new Contact and an Account will be created and immediately soft deleted.

Option 2 - Advanced - Building image manually and running tests

If there is the need to modify the image locally, follow the process below:

  • Clone the repository
  • Enter the cloned directory
  • Build the image:
docker build -t thorn .
  • Run the test on the local image:
docker run -v ${PWD}/samples:/tests -t -i thorn ./ user password /tests/sugarsample.js

Thorn's version is defined on ./thorn/package.json. It is currently set to version 0.6.