Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Shushlin <vshushlin@gitlab.com>2019-06-21 15:06:12 +0300
committerNick Thomas <nick@gitlab.com>2019-06-21 15:06:12 +0300
commit6119d5ad7518f547af216d3bdc3d1fcffcfc9c71 (patch)
treecc1a1e74efb5e44bd5c5d152da85b7fed4ff2107 /spec/services/pages_domains
parent176164d37423ffb39d293341799aff757f050d7c (diff)
Don't show private keys for letsencrypt certs
Adds enum certificate_source to pages_domains table with default manually_uploaded Mark certificates as 'gitlab_provided' if the were obtained through Let's Encrypt Mark certificates as 'user_provided' if they were uploaded through controller or api Only show private key in domain edit form if it is 'user_provided' Only show LetsEncrypt option if is enabled by application settings (and feature flag) Refactor and fix some specs to match new logic Don't show Let's Encrypt certificates as well
Diffstat (limited to 'spec/services/pages_domains')
-rw-r--r--spec/services/pages_domains/obtain_lets_encrypt_certificate_service_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/services/pages_domains/obtain_lets_encrypt_certificate_service_spec.rb b/spec/services/pages_domains/obtain_lets_encrypt_certificate_service_spec.rb
index 6d7be27939c..d5f77f3354b 100644
--- a/spec/services/pages_domains/obtain_lets_encrypt_certificate_service_spec.rb
+++ b/spec/services/pages_domains/obtain_lets_encrypt_certificate_service_spec.rb
@@ -137,6 +137,12 @@ describe PagesDomains::ObtainLetsEncryptCertificateService do
expect(pages_domain.certificate).to eq(certificate)
end
+ it 'marks certificate as gitlab_provided' do
+ service.execute
+
+ expect(pages_domain.certificate_source).to eq("gitlab_provided")
+ end
+
it 'removes order from database' do
service.execute