Skip to content

Commit ca9ac3f

Browse files
author
linux_name2
committed
test: fix verify-lib mock in upgrade tests for CI
The mock returned '$1' which resolved to /usr/lib/atomic/common.sh — a path that doesn't exist in CI, causing the patched test script to exit 1 before reaching any assertions.
1 parent c8a222b commit ca9ac3f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎tests/test_upgrade.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ source "$(dirname "${BASH_SOURCE[0]}")/test_harness.sh"
88

99
SCRIPT="${PROJECT_ROOT}/bin/atomic-upgrade"
1010

11-
# Mock verify-lib to return the path of the library
12-
make_mock verify-lib 'echo "$1"; exit 0'
11+
# Mock verify-lib to return the project's common.sh (CI has no /usr/lib/atomic)
12+
make_mock verify-lib "echo '${PROJECT_ROOT}/lib/atomic/common.sh'; exit 0"
1313

1414
# Create a testable copy of atomic-upgrade:
1515
# - Skips the EUID check (tests don't run as root)

0 commit comments

Comments
 (0)