1
0
Fork 0

add more info on how to run and write integration tests

This commit is contained in:
ibizaman 2023-03-10 00:02:33 -08:00
parent 654111527a
commit 5f10d3f307

View file

@ -10,3 +10,28 @@ You can find all integration tests under the [tests/integration](/tests/integrat
```console ```console
nix-build -A tests.integration.keycloak nix-build -A tests.integration.keycloak
``` ```
To run the "simple" integration test for keycloak, execute:
```console
nix-build -A tests.integration.keycloak.simple
```
## Write integration tests
To create an integration test for disnix, you'll need:
- a tarball,
- a manifest build,
- and a test definition with a test script written in Python.
The [NixOS official
documentation](https://nixos.org/manual/nixos/stable/index.html#sec-nixos-tests)
has a complete reference on what python functions are available in the
test script.
To iterate on the test script, the easiest is by far to use the interactive mode by using the `.driverInteractive` attribute, like so:
```console
nix-build -A tests.integration.keycloak.simple.driverInteractive
./result/bin/nixos-test-driver
```