Docker image to run Thorn (https://github.com/sugarcrm/thorn) to test Sugar's REST API
Assuming the the test file sugarsample.js
is located inside the local samples
directory.
Execute:
docker run -v ${PWD}/samples:/tests -t esimonetti/thorndockerized ./runtest.sh https://myurl.com/sugar 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.
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 ./runtest.sh https://myurl.com/sugar user password /tests/sugarsample.js
Thorn's version is defined on ./thorn/package.json
. It is currently set to version 0.6.