@@ -674,6 +674,94 @@ begin_test "ghe-restore with Actions settings"
674
674
)
675
675
end_test
676
676
677
+ begin_test " ghe-restore with Actions settings passing -c"
678
+ (
679
+ set -e
680
+ rm -rf " $GHE_REMOTE_ROOT_DIR "
681
+ setup_remote_metadata
682
+ enable_actions
683
+
684
+ required_files=(
685
+ " actions-config-db-login"
686
+ " actions-config-db-password"
687
+ " actions-framework-access-token"
688
+ " actions-url-signing-hmac-key-primary"
689
+ " actions-url-signing-hmac-key-secondary"
690
+ " actions-oauth-s2s-signing-cert"
691
+ " actions-oauth-s2s-signing-key"
692
+ " actions-oauth-s2s-signing-cert-thumbprint"
693
+ " actions-primary-encryption-cert-thumbprint"
694
+ " actions-aad-cert-thumbprint"
695
+ " actions-delegated-auth-cert-thumbprint"
696
+ " actions-runtime-service-principal-cert"
697
+ " actions-s2s-encryption-cert"
698
+ " actions-secondary-encryption-cert-thumbprint"
699
+ " actions-service-principal-cert"
700
+ " actions-sps-validation-cert-thumbprint"
701
+ " actions-storage-container-prefix"
702
+
703
+ " actions-launch-secrets-private-key"
704
+ " actions-launch-deployer-hmac"
705
+ " actions-launch-client-id"
706
+ " actions-launch-client-secret"
707
+ " actions-launch-receiver-webhook-secret"
708
+ " actions-launch-app-private-key"
709
+ " actions-launch-app-public-key"
710
+ " actions-launch-app-id"
711
+ " actions-launch-app-relay-id"
712
+ " actions-launch-action-runner-secret"
713
+ " actions-launch-azp-app-cert"
714
+ " actions-launch-app-app-private-key"
715
+
716
+ )
717
+
718
+ for file in " ${required_files[@]} " ; do
719
+ echo " foo" > " $GHE_DATA_DIR /current/$file "
720
+ done
721
+
722
+ ghe-restore -v -f -c localhost
723
+
724
+ required_secrets=(
725
+ " secrets.actions.ConfigurationDatabaseSqlLogin"
726
+ " secrets.actions.ConfigurationDatabaseSqlPassword"
727
+ " secrets.actions.FrameworkAccessTokenKeySecret"
728
+ " secrets.actions.UrlSigningHmacKeyPrimary"
729
+ " secrets.actions.UrlSigningHmacKeySecondary"
730
+ " secrets.actions.OAuthS2SSigningCert"
731
+ " secrets.actions.OAuthS2SSigningKey"
732
+ " secrets.actions.OAuthS2SSigningCertThumbprint"
733
+ " secrets.actions.PrimaryEncryptionCertificateThumbprint"
734
+ " secrets.actions.AADCertThumbprint"
735
+ " secrets.actions.DelegatedAuthCertThumbprint"
736
+ " secrets.actions.RuntimeServicePrincipalCertificate"
737
+ " secrets.actions.S2SEncryptionCertificate"
738
+ " secrets.actions.SecondaryEncryptionCertificateThumbprint"
739
+ " secrets.actions.ServicePrincipalCertificate"
740
+ " secrets.actions.SpsValidationCertThumbprint"
741
+ " secrets.actions.storage.container-prefix"
742
+ " secrets.launch.actions-secrets-private-key"
743
+ " secrets.launch.deployer-hmac-secret"
744
+ " secrets.launch.client-id"
745
+ " secrets.launch.client-secret"
746
+ " secrets.launch.receiver-webhook-secret"
747
+ " secrets.launch.app-private-key"
748
+ " secrets.launch.app-public-key"
749
+ " secrets.launch.app-id"
750
+ " secrets.launch.app-relay-id"
751
+ " secrets.launch.action-runner-secret"
752
+ " secrets.launch.token-oauth-key"
753
+ " secrets.launch.token-oauth-cert"
754
+ " secrets.launch.azp-app-cert"
755
+ " secrets.launch.azp-app-private-key"
756
+
757
+ )
758
+
759
+ for secret in " ${required_secrets[@]} " ; do
760
+ [ " $( ghe-ssh " $GHE_HOSTNAME " -- ghe-config " $secret " ) " = " foo" ]
761
+ done
762
+ )
763
+ end_test
764
+
677
765
begin_test " ghe-restore stops and starts Actions"
678
766
(
679
767
set -e
0 commit comments