summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--features/steps/project/pages.rb2
-rw-r--r--spec/factories/pages_domains.rb6
-rw-r--r--spec/models/pages_domain_spec.rb4
3 files changed, 7 insertions, 5 deletions
diff --git a/features/steps/project/pages.rb b/features/steps/project/pages.rb
index ac44aac9e38..b3a6b93c5d0 100644
--- a/features/steps/project/pages.rb
+++ b/features/steps/project/pages.rb
@@ -34,7 +34,7 @@ class Spinach::Features::ProjectPages < Spinach::FeatureSteps
ref: 'HEAD',
artifacts_file: fixture_file_upload(Rails.root + 'spec/fixtures/pages.zip'),
artifacts_metadata: fixture_file_upload(Rails.root + 'spec/fixtures/pages.zip.meta')
- )
+ )
result = ::Projects::UpdatePagesService.new(@project, build).execute
expect(result[:status]).to eq(:success)
end
diff --git a/spec/factories/pages_domains.rb b/spec/factories/pages_domains.rb
index ff72df8dc02..6d2e45f41ba 100644
--- a/spec/factories/pages_domains.rb
+++ b/spec/factories/pages_domains.rb
@@ -63,11 +63,9 @@ VM+d42lQAgoq318A84Xu5vRh1KCAJuztkhNbM+w=
end
trait :with_trusted_chain do
- # This is
+ # This contains
# [Intermediate #2 (SHA-2)] 'Comodo RSA Domain Validation Secure Server CA'
- # [Intermediate #1 (SHA-2)] COMODO RSA Certification Authority
- # We only validate that we want to rebuild the trust chain,
- # we don't need end-to-end certificate to do that
+ # [Intermediate #1 (SHA-2)] 'COMODO RSA Certification Authority'
certificate '-----BEGIN CERTIFICATE-----
MIIGCDCCA/CgAwIBAgIQKy5u6tl1NmwUim7bo3yMBzANBgkqhkiG9w0BAQwFADCB
hTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
diff --git a/spec/models/pages_domain_spec.rb b/spec/models/pages_domain_spec.rb
index 3e083ba9001..0b95bf594c5 100644
--- a/spec/models/pages_domain_spec.rb
+++ b/spec/models/pages_domain_spec.rb
@@ -117,6 +117,10 @@ describe PagesDomain, models: true do
end
context 'for trusted certificate chain' do
+ # We only validate that we can to rebuild the trust chain, for certificates
+ # We assume that 'AddTrustExternalCARoot' needed to validate the chain is in trusted store.
+ # It will be if ca-certificates is installed on Debian/Ubuntu/Alpine
+
let(:domain) { build(:pages_domain, :with_trusted_chain) }
it { is_expected.to be_truthy }