Skip to content

Commit d0272c0

Browse files
committed
Fix unwanted merge changes
1 parent ebca53e commit d0272c0

File tree

3 files changed

+20
-19
lines changed

3 files changed

+20
-19
lines changed

share/github-backup-utils/ghe-detect-leaked-ssh-keys

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ while [ $# -gt 0 ]; do
3434
shift
3535
done
3636

37-
ppid_script=$(ps -o args= $PPID | awk '{print $2}')
37+
ppid_script=$(ps -o args= $PPID 2>/dev/null | awk '{print $2}')
3838
if [ -n "$ppid_script" ]; then
3939
ppid_name=$(basename $ppid_script)
4040
fi

share/github-backup-utils/ghe-restore-repositories-dgit-ng

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ sync_repo_info() {
1616
--rsync-path="sudo -u git rsync" \
1717
"$GHE_DATA_DIR/$GHE_RESTORE_SNAPSHOT/repositories/info/" \
1818
"git-server-$uuid:$GHE_REMOTE_DATA_USER_DIR/repositories/info" 1>&3; then
19-
echo "Error restoring /data/repositories/info to git-server-$uuid"
19+
echo "Error restoring /data/repositories/info to git-server-$uuid" 1>&2
2020
fi
2121
done
2222
else
@@ -26,7 +26,7 @@ sync_repo_info() {
2626
--rsync-path="sudo -u git rsync" \
2727
"$GHE_DATA_DIR/$GHE_RESTORE_SNAPSHOT/repositories/info/" \
2828
"$route:$GHE_REMOTE_DATA_USER_DIR/repositories/info" 1>&3; then
29-
echo "Error restoring /data/repositories/info to $route"
29+
echo "Error restoring /data/repositories/info to $route" 1>&2
3030
fi
3131
done
3232
fi

test/test-ghe-backup.sh

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -441,10 +441,26 @@ begin_test "ghe-backup fsck"
441441
)
442442
end_test
443443

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"
445445
(
446446
set -e
447447

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+
448464
SHARED_UTILS_PATH=$(dirname $(which ghe-detect-leaked-ssh-keys))
449465
# Inject the fingerprint into the blacklist
450466
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"
476492

477493
# Make sure there are no leaked key messages
478494
! 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
485495

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" ]
495496
)
496497
end_test

0 commit comments

Comments
 (0)