diff options
Diffstat (limited to 'spec/support/shared_examples/models/cluster_application_helm_cert_shared_examples.rb')
-rw-r--r-- | spec/support/shared_examples/models/cluster_application_helm_cert_shared_examples.rb | 38 |
1 files changed, 4 insertions, 34 deletions
diff --git a/spec/support/shared_examples/models/cluster_application_helm_cert_shared_examples.rb b/spec/support/shared_examples/models/cluster_application_helm_cert_shared_examples.rb index 239588d3b2f..394253fb699 100644 --- a/spec/support/shared_examples/models/cluster_application_helm_cert_shared_examples.rb +++ b/spec/support/shared_examples/models/cluster_application_helm_cert_shared_examples.rb @@ -28,46 +28,16 @@ RSpec.shared_examples 'cluster application helm specs' do |application_name| describe '#files' do subject { application.files } - context 'managed_apps_local_tiller feature flag is disabled' do - before do - stub_feature_flags(managed_apps_local_tiller: false) - end - - context 'when the helm application does not have a ca_cert' do - before do - application.cluster.application_helm.ca_cert = nil - end - - it 'does not include cert files when there is no ca_cert entry' do - expect(subject).not_to include(:'ca.pem', :'cert.pem', :'key.pem') - end - end - - it 'includes cert files when there is a ca_cert entry' do - expect(subject).to include(:'ca.pem', :'cert.pem', :'key.pem') - expect(subject[:'ca.pem']).to eq(application.cluster.application_helm.ca_cert) - - cert = OpenSSL::X509::Certificate.new(subject[:'cert.pem']) - expect(cert.not_after).to be < 60.minutes.from_now - end + it 'does not include cert files' do + expect(subject).not_to include(:'ca.pem', :'cert.pem', :'key.pem') end - context 'managed_apps_local_tiller feature flag is enabled' do - before do - stub_feature_flags(managed_apps_local_tiller: application.cluster.clusterable) - end + context 'when cluster does not have helm installed' do + let(:application) { create(application_name, :no_helm_installed) } it 'does not include cert files' do expect(subject).not_to include(:'ca.pem', :'cert.pem', :'key.pem') end - - context 'when cluster does not have helm installed' do - let(:application) { create(application_name, :no_helm_installed) } - - it 'does not include cert files' do - expect(subject).not_to include(:'ca.pem', :'cert.pem', :'key.pem') - end - end end end end |