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.
1
pub global activate critical_test
2
pub global activate dcli
3
dcli install
Copied!
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:
1
container\tool\critical_test\pre_hook\setup.dart
Copied!
To run the unit tests:
1
cd shared
2
critical_test
3
cd ../container
4
critical_test
5
cd ../cli
6
critical_test
Copied!
Last modified 4mo ago
Copy link