oliver-zehentleitner / maity
deploy: a shared test-lib.sh for the backup and restore test scripts (extract, backup.yaml scripts, fail, re-root)
tsk-3rmvt8hbwkpt Open
Audit round 3 (tsk-hgnbapyw7hnh), read at 588f911b. Kind: duplication (test harness). Running these tests in CI is a note on tsk-0ssrf55nnvgx.
What is wrong: the new deploy test scripts repeat their harness:
deploy/scripts/test-backup-dump.sh:16-23andtest-backup-signing.sh:18-25: the same Python snippet pullsinit.shanddump.shout ofbackup.yaml.test-restore-blocks.sh:23-30andtest-backup-signing.sh:124-131: the sameextract()awk (the second commented "as in test-restore-blocks.sh").fail()attest-backup-dump.sh:38andtest-backup-signing.sh:47; thesedre-rooting ofdeploy/postgres-roles.sqlattest-restore-blocks.sh:33andtest-backup-signing.sh:135.
Proposal: a sourced deploy/scripts/test-lib.sh with extract, backup_scripts, fail and the re-root.
Effort / risk: S. Low risk (test only).