@@ -391,6 +391,7 @@ begin_test "ghe-restore cluster"
391
391
(
392
392
set -e
393
393
rm -rf " $GHE_REMOTE_ROOT_DIR "
394
+ setup_moreutils_parallel
394
395
setup_remote_metadata
395
396
setup_remote_cluster
396
397
echo " cluster" > " $GHE_DATA_DIR /current/strategy"
@@ -402,21 +403,14 @@ begin_test "ghe-restore cluster"
402
403
GHE_RESTORE_HOST=127.0.0.1
403
404
export GHE_RESTORE_HOST
404
405
405
- # CI servers may have moreutils parallel and GNU parallel installed. We need moreutils parallel.
406
- if [ -x " /usr/bin/parallel.moreutils" ]; then
407
- ln -sf /usr/bin/parallel.moreutils " $ROOTDIR /test/bin/parallel"
408
- fi
409
-
410
406
# run ghe-restore and write output to file for asserting against
411
407
if ! ghe-restore -v -f > " $TRASHDIR /restore-out" 2>&1 ; then
412
408
cat " $TRASHDIR /restore-out"
413
409
: ghe-restore should have exited successfully
414
410
false
415
411
fi
416
412
417
- if [ -h " $ROOTDIR /test/bin/parallel" ]; then
418
- unlink " $ROOTDIR /test/bin/parallel"
419
- fi
413
+ cleanup_moreutils_parallel
420
414
421
415
# for debugging
422
416
cat " $TRASHDIR /restore-out"
@@ -461,6 +455,7 @@ begin_test "ghe-restore missing directories or files from source snapshot displa
461
455
# Tests the scenario where something exists in the database, but not on disk.
462
456
set -e
463
457
rm -rf " $GHE_REMOTE_ROOT_DIR "
458
+ setup_moreutils_parallel
464
459
setup_remote_metadata
465
460
setup_remote_cluster
466
461
echo " cluster" > " $GHE_DATA_DIR /current/strategy"
@@ -472,11 +467,6 @@ begin_test "ghe-restore missing directories or files from source snapshot displa
472
467
GHE_RESTORE_HOST=127.0.0.1
473
468
export GHE_RESTORE_HOST
474
469
475
- # CI servers may have moreutils parallel and GNU parallel installed. We need moreutils parallel.
476
- if [ -x " /usr/bin/parallel.moreutils" ]; then
477
- ln -sf /usr/bin/parallel.moreutils " $ROOTDIR /test/bin/parallel"
478
- fi
479
-
480
470
# Tell dgit-cluster-restore-finalize and gist-cluster-restore-finalize to return warnings
481
471
export GHE_DGIT_CLUSTER_RESTORE_FINALIZE_WARNING=1
482
472
export GHE_GIST_CLUSTER_RESTORE_FINALIZE_WARNING=1
@@ -488,9 +478,7 @@ begin_test "ghe-restore missing directories or files from source snapshot displa
488
478
false
489
479
fi
490
480
491
- if [ -h " $ROOTDIR /test/bin/parallel" ]; then
492
- unlink " $ROOTDIR /test/bin/parallel"
493
- fi
481
+ cleanup_moreutils_parallel
494
482
495
483
# for debugging
496
484
cat " $TRASHDIR /restore-out"
0 commit comments