From d324d050cd3d0ac3fa837189b1b570f8f0bf322b Mon Sep 17 00:00:00 2001 From: decentral1se Date: Thu, 7 Sep 2023 17:09:41 +0200 Subject: [PATCH] docs: moar moar integration suite docs --- docs/abra/hack.md | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/docs/abra/hack.md b/docs/abra/hack.md index 1311c55..ec6c2e8 100644 --- a/docs/abra/hack.md +++ b/docs/abra/hack.md @@ -33,13 +33,31 @@ apt install bats bats-file bats-assert bats-support jq make git Then you can run the integration test suite with the following: ``` -export TEST_DOMAIN="test.example.com" +export ABRA_TEST_DOMAIN="test.example.com" export ABRA_DIR="$HOME/.abra_test" bats tests/integration ``` -`TEST_DOMAIN` should also have a DNS A record for `*.test.example.com` which -points to the same server so that the test suite can deploy apps freely. +`ABRA_TEST_DOMAIN` should also have a DNS A record for `*.test.example.com` +which points to the same server so that the test suite can deploy apps freely. + +If you're hacking on the tests, you can speed things up with the following. + +``` +export ABRA_SKIP_TEARDOWN=1 +``` + +This will avoid nuking `$ABRA_DIR` for each test which avoids the costly `git +clone` of the catalogue on each test run. For the actual CI testing, we +probably want this clean slate on each test to avoid confusion. + +You can filter on test names and/or tags to run specific kinds of tests. + +``` +bats tests/integration \ + --filter "validate app argument" \ + --filter-tags "app_backup,\!slow" +``` ## Using the `abra` public API