summaryrefslogtreecommitdiff
path: root/spec/factories/pages_domains.rb
diff options
context:
space:
mode:
authorVladimir Shushlin <vshushlin@gitlab.com>2019-06-21 12:06:12 +0000
committerNick Thomas <nick@gitlab.com>2019-06-21 12:06:12 +0000
commit6119d5ad7518f547af216d3bdc3d1fcffcfc9c71 (patch)
treecc1a1e74efb5e44bd5c5d152da85b7fed4ff2107 /spec/factories/pages_domains.rb
parent176164d37423ffb39d293341799aff757f050d7c (diff)
downloadgitlab-ce-6119d5ad7518f547af216d3bdc3d1fcffcfc9c71.tar.gz
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/factories/pages_domains.rb')
-rw-r--r--spec/factories/pages_domains.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/factories/pages_domains.rb b/spec/factories/pages_domains.rb
index db8384877b0..8da19a37a6a 100644
--- a/spec/factories/pages_domains.rb
+++ b/spec/factories/pages_domains.rb
@@ -180,5 +180,9 @@ Iy6oRpHaCF/2obZdIdgf9rlyz0fkqyHJc9GkioSoOhJZxEV2SgAkap8yS0sX2tJ9
ZDXgrA==
-----END CERTIFICATE-----'
end
+
+ trait :letsencrypt do
+ certificate_source { :gitlab_provided }
+ end
end
end