README-testing.md (1920B)
1 # Testing the auditor WebUI with generated databases 2 3 Run the helper from `build/src/auditor` as a normal, non-root user. It runs the 4 ordinary auditor test case, starts the generated PostgreSQL cluster, and opens 5 an interactive shell with the test environment configured: 6 7 ```shell 8 ./auditor-test-shell.sh 9 ``` 10 11 Use the KYC-enabled sample instead with: 12 13 ```shell 14 ./auditor-test-shell.sh kyc 15 ``` 16 17 The KYC fixture includes a completed KYC process and a payout that is 18 legitimately held for KYC. Both fixtures represent internally consistent 19 activity, so inconsistency lists should normally be empty. Their balance and 20 progress pages contain the values produced by the auditor helpers. 21 22 Inside the shell, `CONF`, `PGDATA`, `PGHOST`, `DB`, and `REUSE_BASEDB_DIR` point 23 to the generated fixture. Start the auditor in the foreground with: 24 25 ```shell 26 taler-auditor-httpd -c "$CONF" -L INFO --no-authentication 27 ``` 28 29 `--no-authentication` is appropriate only for this local test setup. Open 30 <http://localhost:8083/webui/> to use the WebUI. 31 32 ## Show inconsistencies 33 34 Inside the test shell, load several inconsistencies before starting the auditor: 35 36 ```shell 37 auditor-test-scenario.sh all 38 ``` 39 40 The individual scenarios are `bad-signature`, `reserve-credit`, and 41 `emergency`. Each command restores the original sample before introducing its 42 inconsistency, so use `all` to show them together. Restore clean reports with: 43 44 ```shell 45 auditor-test-scenario.sh clean 46 ``` 47 48 The scenarios run the real auditor helpers and leave their logs in 49 `$REUSE_BASEDB_DIR/scenario-logs/`. 50 51 Leaving the shell stops the PostgreSQL instance started by the helper but keeps 52 the fixture directory. The helper prints its `REUSE_BASEDB_DIR`; reopen that 53 fixture without regenerating it using: 54 55 ```shell 56 REUSE_BASEDB_DIR=/tmp/taler-auditor-basedbXXXXXX \ 57 ./auditor-test-shell.sh 58 ``` 59 60 Remove that directory manually when the fixture is no longer needed.