test: improve semi-manual testing

This commit is contained in:
2022-01-21 16:38:47 +01:00
parent c7062e0494
commit 57728e58e8
8 changed files with 88 additions and 21 deletions

View File

@ -2,3 +2,10 @@
- `cp .envrc.sample .envrc` (fill out values && `direnv allow`)
- `TARGET=install.sh make` (ensure `docker context use default`)
`testfunctions.sh` contains the functions necessary to save and manipulate logs
run `test_all.sh logdir` to run tests specified in that file and save the logs to `logdir`
when creating new tests, make sure the test command is a one-liner (you can use `;` to separate commands). include `testfunctions.sh` and then write your tests like this:
`run_test '$ABRA other stuff here'`
by default, the testing script will ask after every command if the execution succeeded. If you reply `n`, it will log the test in the `logdir`. If you want all tests to run without questions, run `export logall=yes` before executing the test script