Skip to content

Commit 1e354fe

Browse files
committed
test-lib: change path when running ipfs-update
1 parent 3a37320 commit 1e354fe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sharness/lib/test-lib.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,12 @@ GUEST_RANDOM_FILES="sharness/bin/random-files"
8989
test_install_version() {
9090
VERSION="$1"
9191

92+
# We have to change the PATH as ipfs-update might call fs-repo-migrations
9293
test_expect_success "'ipfs-update install' works for $VERSION" '
93-
exec_docker "$DOCID" "PATH=sharness/bin:$PATH; $GUEST_IPFS_UPDATE --verbose install $VERSION" >actual 2>&1 ||
94+
DOCPWD=$(exec_docker "$DOCID" "pwd") &&
95+
DOCPATH=$(exec_docker "$DOCID" "echo \$PATH") &&
96+
NEWPATH="$DOCPWD/sharness/bin:$DOCPATH" &&
97+
exec_docker "$DOCID" "export PATH=\"$NEWPATH\" && $GUEST_IPFS_UPDATE --verbose install $VERSION" >actual 2>&1 ||
9498
test_fsh cat actual
9599
'
96100

0 commit comments

Comments
 (0)