Skip to content

Commit e7f0fc2

Browse files
committed
test(upgrade): fix dry-run message prefixes and config file handling
1 parent 0be9598 commit e7f0fc2

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

‎tests/test_upgrade.sh‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ run_upgrade() {
4848

4949
# Helper: run with ATOMIC_EXIT_AFTER_PARSE=1 to capture variable state
5050
run_upgrade_parse() {
51-
run_cmd env ATOMIC_EXIT_AFTER_PARSE=1 bash "$TEST_SCRIPT" "$@"
51+
run_cmd env ATOMIC_EXIT_AFTER_PARSE=1 CONFIG_FILE="${TESTDIR}/test-empty.conf" bash "$TEST_SCRIPT" "$@"
5252
}
5353

5454
# ── Help & version (real script, no patching needed) ───────
@@ -348,18 +348,18 @@ _script_content=$(cat "$SCRIPT")
348348

349349
# Output strings that must be present in the dry-run block
350350
assert_contains "has 'Current -> New' line" "Current:" "$_script_content"
351-
assert_contains "has snapshot message" "DRY RUN - would create snapshot" "$_script_content"
352-
assert_contains "has UKI path message" "DRY RUN - would create UKI" "$_script_content"
353-
assert_contains "has chroot command message" "DRY RUN - chroot command" "$_script_content"
354-
assert_contains "has GC enabled message" "DRY RUN - would run garbage collection" "$_script_content"
355-
assert_contains "has GC disabled message" "DRY RUN - garbage collection: disabled" "$_script_content"
356-
assert_contains "has complete message" "DRY RUN complete, no changes made" "$_script_content"
357-
assert_contains "has available updates message" "DRY RUN - available updates" "$_script_content"
358-
assert_contains "has signing disabled message" "DRY RUN - sbctl signing: disabled" "$_script_content"
359-
assert_contains "has signing enabled message" "DRY RUN - would sign UKI with sbctl" "$_script_content"
360-
assert_contains "has home isolated message" "Home: isolated" "$_script_content"
361-
assert_contains "has create home message" "DRY RUN - would create home" "$_script_content"
362-
assert_contains "has use existing home message" "DRY RUN - would use existing home" "$_script_content"
351+
assert_contains "has snapshot message" ":: DRY RUN - would create snapshot" "$_script_content"
352+
assert_contains "has UKI path message" ":: DRY RUN - would create UKI" "$_script_content"
353+
assert_contains "has chroot command message" ":: DRY RUN - chroot command" "$_script_content"
354+
assert_contains "has GC enabled message" ":: DRY RUN - would run garbage collection" "$_script_content"
355+
assert_contains "has GC disabled message" ":: DRY RUN - garbage collection: disabled" "$_script_content"
356+
assert_contains "has complete message" ":: DRY RUN complete, no changes made" "$_script_content"
357+
assert_contains "has available updates message" ":: DRY RUN - available updates:" "$_script_content"
358+
assert_contains "has signing disabled message" ":: DRY RUN - sbctl signing: disabled" "$_script_content"
359+
assert_contains "has signing enabled message" ":: DRY RUN - would sign UKI with sbctl" "$_script_content"
360+
assert_contains "has home isolated message" ":: Home: isolated" "$_script_content"
361+
assert_contains "has create home message" ":: DRY RUN - would create home" "$_script_content"
362+
assert_contains "has use existing home message" ":: DRY RUN - would use existing home" "$_script_content"
363363

364364
# Conditional structures that control branching
365365
assert_contains "has NO_GC conditional" '"$NO_GC" -eq 0' "$_script_content"

0 commit comments

Comments
 (0)