@@ -622,6 +622,94 @@ begin_test "ghe-restore with Actions settings"
622
622
)
623
623
end_test
624
624
625
+ begin_test " ghe-restore with Actions settings passing -c"
626
+ (
627
+ set -e
628
+ rm -rf " $GHE_REMOTE_ROOT_DIR "
629
+ setup_remote_metadata
630
+ enable_actions
631
+
632
+ required_files=(
633
+ " actions-config-db-login"
634
+ " actions-config-db-password"
635
+ " actions-framework-access-token"
636
+ " actions-url-signing-hmac-key-primary"
637
+ " actions-url-signing-hmac-key-secondary"
638
+ " actions-oauth-s2s-signing-cert"
639
+ " actions-oauth-s2s-signing-key"
640
+ " actions-oauth-s2s-signing-cert-thumbprint"
641
+ " actions-primary-encryption-cert-thumbprint"
642
+ " actions-aad-cert-thumbprint"
643
+ " actions-delegated-auth-cert-thumbprint"
644
+ " actions-runtime-service-principal-cert"
645
+ " actions-s2s-encryption-cert"
646
+ " actions-secondary-encryption-cert-thumbprint"
647
+ " actions-service-principal-cert"
648
+ " actions-sps-validation-cert-thumbprint"
649
+ " actions-storage-container-prefix"
650
+
651
+ " actions-launch-secrets-private-key"
652
+ " actions-launch-deployer-hmac"
653
+ " actions-launch-client-id"
654
+ " actions-launch-client-secret"
655
+ " actions-launch-receiver-webhook-secret"
656
+ " actions-launch-app-private-key"
657
+ " actions-launch-app-public-key"
658
+ " actions-launch-app-id"
659
+ " actions-launch-app-relay-id"
660
+ " actions-launch-action-runner-secret"
661
+ " actions-launch-azp-app-cert"
662
+ " actions-launch-app-app-private-key"
663
+
664
+ )
665
+
666
+ for file in " ${required_files[@]} " ; do
667
+ echo " foo" > " $GHE_DATA_DIR /current/$file "
668
+ done
669
+
670
+ ghe-restore -v -f -c localhost
671
+
672
+ required_secrets=(
673
+ " secrets.actions.ConfigurationDatabaseSqlLogin"
674
+ " secrets.actions.ConfigurationDatabaseSqlPassword"
675
+ " secrets.actions.FrameworkAccessTokenKeySecret"
676
+ " secrets.actions.UrlSigningHmacKeyPrimary"
677
+ " secrets.actions.UrlSigningHmacKeySecondary"
678
+ " secrets.actions.OAuthS2SSigningCert"
679
+ " secrets.actions.OAuthS2SSigningKey"
680
+ " secrets.actions.OAuthS2SSigningCertThumbprint"
681
+ " secrets.actions.PrimaryEncryptionCertificateThumbprint"
682
+ " secrets.actions.AADCertThumbprint"
683
+ " secrets.actions.DelegatedAuthCertThumbprint"
684
+ " secrets.actions.RuntimeServicePrincipalCertificate"
685
+ " secrets.actions.S2SEncryptionCertificate"
686
+ " secrets.actions.SecondaryEncryptionCertificateThumbprint"
687
+ " secrets.actions.ServicePrincipalCertificate"
688
+ " secrets.actions.SpsValidationCertThumbprint"
689
+ " secrets.actions.storage.container-prefix"
690
+ " secrets.launch.actions-secrets-private-key"
691
+ " secrets.launch.deployer-hmac-secret"
692
+ " secrets.launch.client-id"
693
+ " secrets.launch.client-secret"
694
+ " secrets.launch.receiver-webhook-secret"
695
+ " secrets.launch.app-private-key"
696
+ " secrets.launch.app-public-key"
697
+ " secrets.launch.app-id"
698
+ " secrets.launch.app-relay-id"
699
+ " secrets.launch.action-runner-secret"
700
+ " secrets.launch.token-oauth-key"
701
+ " secrets.launch.token-oauth-cert"
702
+ " secrets.launch.azp-app-cert"
703
+ " secrets.launch.azp-app-private-key"
704
+
705
+ )
706
+
707
+ for secret in " ${required_secrets[@]} " ; do
708
+ [ " $( ghe-ssh " $GHE_HOSTNAME " -- ghe-config " $secret " ) " = " foo" ]
709
+ done
710
+ )
711
+ end_test
712
+
625
713
begin_test " ghe-restore stops and starts Actions"
626
714
(
627
715
set -e
0 commit comments