Testing

Nginx-LE uses the critical_test and DCli package to run unit tests.

You should have both of these installed before you start testing.

pub global activate critical_test
pub global activate dcli
dcli install

Critical tests provides the ability to setup a no. of pre and post test hooks.

Nginx-LE relies on these hooks to correctly configure the test environment.

In particular the pre test setup hook compiles and installs the auth, deploy and cleanup hooks onto your path (using the DCli path ~/.dcli/bin) before running the tests.

If you can't use critical_test for some reason then you can directly run the setup script:

container\tool\critical_test\pre_hook\setup.dart

To run the unit tests:

cd shared
critical_test
cd ../container
critical_test
cd ../cli
critical_test

Last updated