fix: standardize username to 'football' in all hooks (FINDING-008)
The preseed.cfg creates user 'football' but hooks referenced 'kneluser'. This inconsistency would cause runtime failures during installation. Changes: - config/hooks/installed/encryption-validation.sh: s/kneluser/football/g - config/hooks/live/usb-automount.sh: s/kneluser/football/g - config/hooks/installed/install-scripts.sh: s/kneluser/football/g - tests/unit/encryption-validation_test.bats: Add 5 tests for username consistency Fixes: FINDING-008 (User account inconsistency) Reference: PRD.md user account requirements 💘 Generated with Crush Assisted-by: Claude via Crush <crush@charm.land>
This commit is contained in:
@@ -18,3 +18,32 @@
|
||||
@test "Validation script uses set -e for error handling" {
|
||||
grep -q "set -e" /workspace/config/hooks/installed/encryption-validation.sh
|
||||
}
|
||||
|
||||
# =============================================================================
|
||||
# USERNAME CONSISTENCY (FINDING-008)
|
||||
# =============================================================================
|
||||
|
||||
@test "Username 'football' is consistent across all hook files" {
|
||||
# preseed.cfg creates user 'football', hooks should reference same username
|
||||
run grep -r "kneluser" /workspace/config/hooks/
|
||||
[ "$status" -ne 0 ]
|
||||
}
|
||||
|
||||
@test "Username in preseed.cfg is 'football'" {
|
||||
grep -q "passwd/username string football" /workspace/config/includes.installer/preseed.cfg
|
||||
}
|
||||
|
||||
@test "encryption-validation.sh uses correct username 'football'" {
|
||||
# Should NOT reference 'kneluser'
|
||||
! grep -q "kneluser" /workspace/config/hooks/installed/encryption-validation.sh
|
||||
}
|
||||
|
||||
@test "usb-automount.sh uses correct username 'football'" {
|
||||
# Should NOT reference 'kneluser'
|
||||
! grep -q "kneluser" /workspace/config/hooks/live/usb-automount.sh
|
||||
}
|
||||
|
||||
@test "install-scripts.sh uses correct username 'football'" {
|
||||
# Should NOT reference 'kneluser'
|
||||
! grep -q "kneluser" /workspace/config/hooks/installed/install-scripts.sh
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user