aboutsummaryrefslogtreecommitdiff
path: root/README.org
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-04-13 03:35:00 -0400
committerCraig Jennings <c@cjennings.net>2026-04-13 03:35:00 -0400
commit06626390e75db998164f56fb968059c56502a18b (patch)
tree88aed39f449cc7977e4599f986b7dd268acbde55 /README.org
parenta15a92cf36d2460784587b3fa6f586e94e9ff6ab (diff)
downloadarchangel-06626390e75db998164f56fb968059c56502a18b.tar.gz
archangel-06626390e75db998164f56fb968059c56502a18b.zip
docs: document bats unit tests + sync stale README bits
testing-strategy.org: - Frame the two test layers (bats unit / VM integration) in Overview - Add 'Unit Tests (bats)' section: what's covered, what's deliberately not, how to run, how to install, and the extract-then-test pattern - Fix stale Makefile Targets table (bats row, test row now lint+bats) README.org: - Rename 'Testing with VMs' to 'Testing' and add the two-layer framing - Surface make test / make bats / make lint in the bulleted list - Project Structure tree: drop zfs.sh (deleted last session), add raid.sh with description, add tests/unit/ entry - Point archzfs link to GitHub Releases (archzfs.com was abandoned mid-2025; url updated in code last session) - Fix #testing-with-vms internal link to match the renamed heading
Diffstat (limited to 'README.org')
-rw-r--r--README.org34
1 files changed, 19 insertions, 15 deletions
diff --git a/README.org b/README.org
index c82c3bd..905e4e8 100644
--- a/README.org
+++ b/README.org
@@ -57,7 +57,7 @@ The build script will report if you're missing any of these in a preflight check
** Basic Build
-The makefile is your primary entry point for building, [[#testing-with-vms][testing]], and cleaning the project ISO.
+The makefile is your primary entry point for building, [[#testing][testing]], and cleaning the project ISO.
#+BEGIN_SRC bash
make build
@@ -303,16 +303,19 @@ installation and can decline, or set ~ENABLE_SSH=no~ in a config file.
*Important*: Harden SSH after installation — switch to key-based authentication
and consider installing ~fail2ban~.
-* Testing with VMs
+* Testing
-QEMU VMs validate that the ISO boots correctly and that installations complete
-successfully across all supported configurations (ZFS/Btrfs, single/multi-disk,
-encrypted/unencrypted). Run these after modifying the installer or build scripts
-to catch regressions.
+Two test layers: ~make test~ runs shellcheck + bats unit tests for the pure
+logic in ~installer/lib/*.sh~ (fast, no VMs). ~make test-install~ runs the full
+VM integration suite against a freshly built ISO. Use the former every commit;
+the latter before releases or when touching install paths.
-See [[file:testing-strategy.org][testing-strategy.org]] for the full testing strategy,
-including how to add new tests and technical details on encryption testing.
+See [[file:testing-strategy.org][testing-strategy.org]] for the full testing strategy, unit-test coverage,
+how to add new tests, and technical details on encryption testing.
+- ~make test~ — Run shellcheck + bats unit tests (~1s, no VMs needed).
+- ~make bats~ — Run bats unit tests only.
+- ~make lint~ — Run shellcheck on all scripts.
- ~make test-vm~ — Create a 50GB virtual disk and boot the ISO in a
single-disk QEMU VM. Opens a GTK window with the VM console. SSH in
with ~ssh -p 2222 root@localhost~ (password: ~archangel~).
@@ -328,7 +331,6 @@ including how to add new tests and technical details on encryption testing.
first). Runs 12 unattended installs covering ZFS/Btrfs,
single/multi-disk, encrypted/unencrypted, and custom locale. Each
test installs, reboots from disk, verifies boot, and checks rollback.
-- ~make lint~ — Run shellcheck on all scripts.
* Project Structure
@@ -340,14 +342,16 @@ archangel/
│ ├── archangel # Interactive installation script
│ ├── archangel.conf.example # Example config for unattended install
│ ├── lib/ # Modular installer components
-│ │ ├── common.sh # Shared utilities
-│ │ ├── config.sh # Configuration handling
-│ │ ├── disk.sh # Disk partitioning
-│ │ ├── zfs.sh # ZFS-specific functions
-│ │ └── btrfs.sh # Btrfs-specific functions
+│ │ ├── common.sh # Shared utilities, password prompt, pacstrap list
+│ │ ├── config.sh # Argument parsing + config-file loading + validation
+│ │ ├── disk.sh # Disk partitioning and EFI formatting
+│ │ ├── btrfs.sh # Btrfs-specific functions (LUKS, subvolumes, GRUB)
+│ │ └── raid.sh # Pure RAID-level logic (levels, validation, usable space)
│ ├── zfssnapshot # ZFS snapshot utility
│ ├── zfsrollback # ZFS rollback utility
│ └── RESCUE-GUIDE.txt # Recovery tools documentation
+├── tests/
+│ └── unit/ # Bats unit tests for installer/lib/*.sh
├── scripts/
│ ├── test-vm.sh # QEMU test VM launcher
│ ├── test-install.sh # Automated install tests
@@ -403,7 +407,7 @@ The ISO includes DKMS-built ZFS modules. If modules fail to load:
* Links
-- [[https://archzfs.com][archzfs Repository]] - ZFS packages for Arch Linux
+- [[https://github.com/archzfs/archzfs][archzfs Repository]] - ZFS packages for Arch Linux (GitHub Releases; archzfs.com was abandoned mid-2025)
- [[https://openzfs.github.io/openzfs-docs/][OpenZFS Documentation]] - Official ZFS documentation
- [[https://get.zfsbootmenu.org][ZFSBootMenu]] - ZFS boot manager
- [[https://wiki.archlinux.org/title/Btrfs][Arch Wiki - Btrfs]] - Btrfs information