Configuration en variables + tests unitaires BATS

- Conversion config hardcodée en variables (CLUSTER_NODES)
- Détection nœud distant data-driven (extensible à 3+ nœuds)
- Tests unitaires BATS avec mocks complets (32 tests)
- CI/CD Forgejo avec shellcheck et validation syntaxe
- Mode test pour sourcing sans exécution du main
This commit is contained in:
Tellsanguis 2025-12-29 12:29:46 +01:00
parent de4b630399
commit dfa5078b47
8 changed files with 908 additions and 15 deletions

9
tests/fixtures/zfs_list_snapshots.txt vendored Normal file
View file

@ -0,0 +1,9 @@
NAME USED AVAIL REFER MOUNTPOINT
zpool1 5.12T 2.55T 192K /zpool1
zpool1/data-nfs-share 4.89T 2.55T 4.89T /zpool1/data-nfs-share
zpool1/data-nfs-share@autosnap_2024-12-29_14:00:00 128M - 4.89T -
zpool1/data-nfs-share@autosnap_2024-12-29_14:15:00 256M - 4.89T -
zpool1/data-nfs-share@autosnap_2024-12-29_14:30:00 64M - 4.89T -
zpool1/pbs-backups 230G 2.55T 230G /zpool1/pbs-backups
zpool1/pbs-backups@autosnap_2024-12-29_14:00:00 10M - 230G -
zpool1/pbs-backups@autosnap_2024-12-29_14:15:00 15M - 230G -