@@ -441,10 +441,26 @@ begin_test "ghe-backup fsck"
441
441
)
442
442
end_test
443
443
444
- begin_test " ghe-backup with leaked SSH host key detection for current backup "
444
+ begin_test " ghe-backup stores version when not run from a clone "
445
445
(
446
446
set -e
447
447
448
+ # Make sure this doesn't exist
449
+ rm -f " $GHE_REMOTE_DATA_USER_DIR /common/backup-utils-version"
450
+
451
+ mv " $ROOTDIR /.git" " $ROOTDIR /.gittmp"
452
+ ghe-backup
453
+ mv " $ROOTDIR /.gittmp" " $ROOTDIR /.git"
454
+
455
+ # verify that ghe-backup wrote its version information to the host
456
+ [ -f " $GHE_REMOTE_DATA_USER_DIR /common/backup-utils-version" ]
457
+ )
458
+ end_test
459
+
460
+ begin_test " ghe-backup with leaked SSH host key detection for current backup"
461
+ (
462
+ set -e
463
+
448
464
SHARED_UTILS_PATH=$( dirname $( which ghe-detect-leaked-ssh-keys) )
449
465
# Inject the fingerprint into the blacklist
450
466
echo 98:d8:99:d3:be:c0:55:05:db:b0:53:2f:1f:ad:b3:60 >> " $SHARED_UTILS_PATH /ghe-ssh-leaked-host-keys-list.txt"
@@ -476,21 +492,6 @@ begin_test "ghe-backup with no leaked keys"
476
492
477
493
# Make sure there are no leaked key messages
478
494
! ghe-backup -v | grep " Leaked key"
479
- )
480
- end_test
481
-
482
- begin_test " ghe-backup stores version when not run from a clone"
483
- (
484
- set -e
485
495
486
- # Make sure this doesn't exist
487
- rm -f " $GHE_REMOTE_DATA_USER_DIR /common/backup-utils-version"
488
-
489
- mv " $ROOTDIR /.git" " $ROOTDIR /.gittmp"
490
- ghe-backup
491
- mv " $ROOTDIR /.gittmp" " $ROOTDIR /.git"
492
-
493
- # verify that ghe-backup wrote its version information to the host
494
- [ -f " $GHE_REMOTE_DATA_USER_DIR /common/backup-utils-version" ]
495
496
)
496
497
end_test
0 commit comments