You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-7
Original file line number
Diff line number
Diff line change
@@ -297,15 +297,20 @@ Pre-built binaries of this module are provided for the following versions of NGI
297
297
298
298
## Testing
299
299
300
-
To test this module, you'll need the [Test::Nginx Perl module](https://github.com/openresty/test-nginx)installed. Then, run `prove` passing in the test or test directory (`t`). This can be done automatically by running `make test`. If Curity isn't running or the `idsh` command can't be found in the system path, then the functional tests that require such a connection will be skipped. Curity should be configured with an OAuth profile that has:
300
+
To test this module, you'll need the [Test::Nginx Perl module](https://github.com/openresty/test-nginx)and [docker-compose](https://docs.docker.com/compose/install/) installed.
301
301
302
-
* A run-time node listening on `localhost` port `8443` for HTTP (not HTTPS) traffic;
303
-
* A token endpoint with a URI of `/dev/oauth/token`;
304
-
* An introspection endpoint with a URI of `/introspection`;
305
-
* An OAuth client named `client-one` with a secret of `0ne!Secret` and the client credential capability; and
306
-
* An OAuth client named `test_gateway_client` and a secret of `Password1` with the introspection capability.
302
+
To run the tests do the following:
307
303
308
-
Internet access to `httpbin.org` is required for the `curity.t` test suite to pass.
304
+
* run `./configure`, make sure you select _No_ for Dynamic module
305
+
* run `make`
306
+
* Setup an `ADMIN_PASSWORD` and the `LICENSE_KEY` for the Curity Identity server that is used in tests*
307
+
* run `make test`
308
+
309
+
This, will run `prove` passing in the test or test directory (`t`).
310
+
311
+
Internet access to `hub.docker.com` is required for the `curity.t` test suite to pass, if the images required are not present locally.
312
+
313
+
\* These variables can be set inline, in your environment or in the docker-compose.yaml file.
309
314
310
315
NGINX must be in the system path; the tests will run the first `nginx` command that's found or bail if none is located. Also, the tests assume that the module is statically linked with NGINX. Before running them, be sure that the module is linked into the NGINX binary. Also, debug logging must be compiled into NGINX for some tests in `config.t` to pass. (This is the case if `nginx -V` includes `--with-debug` in the output.)
0 commit comments