Skip to content

Commit 24b1d32

Browse files
committed
Cover argon2 secret in backup test
1 parent 722ebb0 commit 24b1d32

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

test/test-ghe-backup.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,17 @@ begin_test "ghe-backup without password pepper"
132132
)
133133
end_test
134134

135+
begin_test "ghe-backup without management console argon2 secret"
136+
(
137+
set -e
138+
139+
git config -f "$GHE_REMOTE_DATA_USER_DIR/common/secrets.conf" secrets.manage-auth.argon-secret ""
140+
ghe-backup
141+
142+
[ ! -f "$GHE_DATA_DIR/current/manage-argon-secret" ]
143+
)
144+
end_test
145+
135146
begin_test "ghe-backup empty git-hooks directory"
136147
(
137148
set -e

test/testlib.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ setup_test_data () {
202202
# Create a fake manage password file§
203203
mkdir -p "$GHE_REMOTE_DATA_USER_DIR/common"
204204
git config -f "$GHE_REMOTE_DATA_USER_DIR/common/secrets.conf" secrets.manage "fake password hash data"
205+
git config -f "$GHE_REMOTE_DATA_USER_DIR/common/secrets.conf" secrets.manage-auth.argon-secret "fake argon2 secret"
205206

206207
# Create a fake password pepper file
207208
mkdir -p "$GHE_REMOTE_DATA_USER_DIR/common"

0 commit comments

Comments
 (0)