File tree Expand file tree Collapse file tree 2 files changed +29
-3
lines changed
share/github-backup-utils Expand file tree Collapse file tree 2 files changed +29
-3
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,9 @@ restore-secret "external MySQL password" "external-mysql-password" "secrets.exte
40
40
41
41
# Restore management console password hash if present.
42
42
restore-secret " management console password" " manage-password" " secrets.manage"
43
- restore-secret " Kredz credz HMAC key" " kredz-credz-hmac" " secrets.kredz.credz-hmac-secret"
43
+
44
+ # Restore kredz.credz HMAC key if present.
45
+ restore-secret " kredz.credz HMAC key" " kredz-credz-hmac" " secrets.kredz.credz-hmac-secret"
44
46
45
47
# Restore SAML keys if present.
46
48
if [ -f " $GHE_RESTORE_SNAPSHOT_PATH /saml-keys.tar" ]; then
Original file line number Diff line number Diff line change @@ -309,6 +309,32 @@ begin_test "ghe-restore invokes ghe-import-mssql"
309
309
)
310
310
end_test
311
311
312
+ begin_test " ghe-restore with Kredz settings"
313
+ (
314
+ set -e
315
+ rm -rf " $GHE_REMOTE_ROOT_DIR "
316
+ setup_remote_metadata
317
+ enable_actions
318
+
319
+ required_files=(
320
+ " kredz-credz-hmac"
321
+ )
322
+
323
+ for file in " ${required_files[@]} " ; do
324
+ echo " foo" > " $GHE_DATA_DIR /current/$file "
325
+ done
326
+
327
+ ghe-restore -v -f localhost
328
+ required_secrets=(
329
+ " secrets.kredz.credz-hmac-secret"
330
+ )
331
+
332
+ for secret in " ${required_secrets[@]} " ; do
333
+ [ " $( ghe-ssh " $GHE_HOSTNAME " -- ghe-config " $secret " ) " = " foo" ]
334
+ done
335
+ )
336
+ end_test
337
+
312
338
begin_test " ghe-restore with Actions settings"
313
339
(
314
340
set -e
@@ -347,7 +373,6 @@ begin_test "ghe-restore with Actions settings"
347
373
" actions-launch-azp-app-cert"
348
374
" actions-launch-app-app-private-key"
349
375
350
- " kredz-credz-hmac"
351
376
)
352
377
353
378
for file in " ${required_files[@]} " ; do
@@ -389,7 +414,6 @@ begin_test "ghe-restore with Actions settings"
389
414
" secrets.launch.azp-app-cert"
390
415
" secrets.launch.azp-app-private-key"
391
416
392
- " secrets.kredz.credz-hmac-secret"
393
417
)
394
418
395
419
for secret in " ${required_secrets[@]} " ; do
You can’t perform that action at this time.
0 commit comments