Skip to content

Latest commit

 

History

History

tests

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

LappDog: Test

Notes

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.

Test Suite

# Runs all tests
./suite.sh

Database Tests

# Runs the tests using the database container.
./db/local.sh

Implementation Tests

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 and LAPPDOG_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.

Viewer Tests

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

License

Everything we produced here is licensed under the MIT License.