At this moment we are not validating the outcome of the tests, so it's necessary to comb through the generated output to look for errors.
The tests use several environment variables defined on env files, which are automatically loaded by the scripts mentioned here.
# Runs all tests
./suite.sh
# Runs the tests using the database container.
./db/local.sh
The implementation tests require the database module.
# Starts the database container.
../compose.sh up -d --build db
The tests are flexible regarding where the LappDog implementation is running - its location can be specified using three different approaches:
- Passing an address that starts with http.
./implementations/curl/node.sh http://192.168.2.20:1234
./implementations/curl/go.sh https://example.com:8321
- Passing a value that is taken as a port for
http://$LAPPDOG_LOCAL_*_PORT
(http://localhost
by default).
./implementations/curl/node.sh 3001
./implementations/curl/go.sh 3002
- Using the host and port defined by the environment variables
LAPPDOG_LOCAL_*_HOST
andLAPPDOG_LOCAL_*_PORT
.
# LAPPDOG_LOCAL_NODE_HOST and LAPPDOG_LOCAL_NODE_PORT
./implementations/curl/node.sh
# LAPPDOG_LOCAL_GO_HOST and LAPPDOG_LOCAL_GO_PORT
./implementations/curl/go.sh
The implementation test also has http files that are meant to be used with the VSCode extension REST Client.
As with the implementation tests, there are three ways to specify the viewer's location:
./viewer/fetch.sh http://192.168.3.50
./viewer/fetch.sh 3003
./viewer/fetch.sh
./viewer/env.sh http://192.168.3.50
./viewer/env.sh 3003
./viewer/env.sh
Everything we produced here is licensed under the MIT License.