๐ Authoring tests¶
DrevOps uses Bats for testing. Bats is a TAP-compliant testing framework for Bash. It provides a simple way to verify that the UNIX programs you write behave as expected.
See Bats documentation for more information.
Installation¶
Usage¶
Updating test assets¶
Some tests use test fixtures such as Drupal database snapshots.
Updating demo database file dump¶
- Run fresh build of DrevOps locally:
- Check that everything looks correctly on the site.
- Export DB
- Make sure that exported DB does not have data in
cache_*
andwatchdog
tables. - Upload DB to https://github.com/drevops/drevops/wiki as a test file (
db.distN.sql
). - Update references in code from
db.demo.sql
todb.distN.sql
. - Run CI build.
- Revert updated references to
db.demo.sql
. - Update
db.demo.sql
in Wiki. - Merge branch to
main
. - Wait for CI to pass.
- Remove
db.distN.sql
from Wiki.
Updating demo database Docker image¶
Work in progress
The documentation section is still a work in progress.