There are a few different types of tests in this repo, which can all be run via the Makefile.
There are integration tests in the t/
directory. These use Perl's Test::NGINX
framework, as described in the Programming Openresty Book. To run these tests, you first must start a working openresty server, which is configured to use the code in the repo (make openresty-dev
). Then, you can run tests using make openresty-unit-test
.
make openresty-build
make openresty-dev
make openresty-unit-test
make openresty-test-e2e
To pick up code changes, you need to re-run luarocks make && nginx -s reload
inside the openresty
container started by make openresty-dev
.
There's a test suite in the w3c/trace-context repo that we run against our code and nginx.conf. To run these:
make openresty-dev
make openresty-test-e2e-trace-context
There's two sets of unit tests oriented around different runtimes.
# Run tests oriented around Openresty
make lua-unit-test
# Run tests that should pass in any Lua runtime
make api-test
This project is not officially part of the OpenTelemetry org yet, but you can find some folks in this Slack channel in CNCF Slack.