diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 18:40:28 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 18:40:28 +0300 |
commit | b595cb0c1dec83de5bdee18284abe86614bed33b (patch) | |
tree | 8c3d4540f193c5ff98019352f554e921b3a41a72 /spec/serializers/environment_entity_spec.rb | |
parent | 2f9104a328fc8a4bddeaa4627b595166d24671d0 (diff) |
Add latest changes from gitlab-org/gitlab@15-2-stable-eev15.2.0-rc42
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) |