appmock allows you to mock a service that exposes REST or TPC interfaces.
- docker client > 1.10
- python >= 2.7
To build appmock use make submodules
then ./make.py
.
appmock can be started using bamboo scripts that are included in the repository. From the root of appmock project, run:
./bamboos/docker/appmock_up.py bamboos/example_env/appmock_example.json
The appmock_up.py
script requires a JSON with configuration - simplest one can be found in bamboos/example_env/appmock_example.json
.
The JSON config includes an entry called app_description_file.json
. Its value should contain path to configuration file (in Erlang) that will be used to expose required endpoints. The path can be relative (to the JSON file) or absolute.
Example app description file can be found in bamboos/example_env/example_app_description.erl
.
It contains exhaustive information on all functionalities that can be used.
Consult the script and the JSON file for more info.
appmock has a remote control interface which allows for validating mocked endpoints and more.
There are two API clients:
that can be used as standalone scripts or included as libraries. Consult them for more information.
appmock is used in onedata during integration and acceptance tests.