diff options
Diffstat (limited to 'spec/serializers/environment_entity_spec.rb')
-rw-r--r-- | spec/serializers/environment_entity_spec.rb | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/spec/serializers/environment_entity_spec.rb b/spec/serializers/environment_entity_spec.rb index 9b6a293da16..cbe32600941 100644 --- a/spec/serializers/environment_entity_spec.rb +++ b/spec/serializers/environment_entity_spec.rb @@ -133,54 +133,6 @@ RSpec.describe EnvironmentEntity do end end - context 'pod_logs' do - context 'with reporter access' do - before do - project.add_reporter(user) - end - - it 'does not expose logs keys' do - expect(subject).not_to include(:logs_path) - expect(subject).not_to include(:logs_api_path) - expect(subject).not_to include(:enable_advanced_logs_querying) - end - end - - context 'with developer access' do - before do - project.add_developer(user) - end - - it 'exposes logs keys' do - expect(subject).to include(:logs_path) - expect(subject).to include(:logs_api_path) - expect(subject).to include(:enable_advanced_logs_querying) - end - - it 'uses k8s api when ES is not available' do - expect(subject[:logs_api_path]).to eq(k8s_project_logs_path(project, environment_name: environment.name, format: :json)) - end - - it 'uses ES api when ES is available' do - allow(environment).to receive(:elastic_stack_available?).and_return(true) - - expect(subject[:logs_api_path]).to eq(elasticsearch_project_logs_path(project, environment_name: environment.name, format: :json)) - end - - context 'with feature flag disabled' do - before do - stub_feature_flags(monitor_logging: false) - end - - it 'does not expose logs keys' do - expect(subject).not_to include(:logs_path) - expect(subject).not_to include(:logs_api_path) - expect(subject).not_to include(:enable_advanced_logs_querying) - end - end - end - end - context 'with deployment service ready' do before do allow(environment).to receive(:has_terminals?).and_return(true) |