Commit c7222834 authored by Vitali Tatarintev's avatar Vitali Tatarintev

Remove alerts unlicenced checks from specs

parent d16c5362
...@@ -26,18 +26,6 @@ describe Projects::Prometheus::AlertsController do ...@@ -26,18 +26,6 @@ describe Projects::Prometheus::AlertsController do
end end
end end
shared_examples 'unlicensed' do
before do
stub_licensed_features(prometheus_alerts: false)
end
it 'returns not_found' do
make_request
expect(response).to have_gitlab_http_status(:not_found)
end
end
shared_examples 'project non-specific environment' do |status| shared_examples 'project non-specific environment' do |status|
let(:other) { create(:environment) } let(:other) { create(:environment) }
...@@ -118,7 +106,6 @@ describe Projects::Prometheus::AlertsController do ...@@ -118,7 +106,6 @@ describe Projects::Prometheus::AlertsController do
end end
it_behaves_like 'unprivileged' it_behaves_like 'unprivileged'
it_behaves_like 'unlicensed'
it_behaves_like 'project non-specific environment', :ok it_behaves_like 'project non-specific environment', :ok
end end
...@@ -166,7 +153,6 @@ describe Projects::Prometheus::AlertsController do ...@@ -166,7 +153,6 @@ describe Projects::Prometheus::AlertsController do
end end
it_behaves_like 'unprivileged' it_behaves_like 'unprivileged'
it_behaves_like 'unlicensed'
it_behaves_like 'project non-specific environment', :not_found it_behaves_like 'project non-specific environment', :not_found
it_behaves_like 'project non-specific metric', :not_found it_behaves_like 'project non-specific metric', :not_found
end end
...@@ -269,7 +255,6 @@ describe Projects::Prometheus::AlertsController do ...@@ -269,7 +255,6 @@ describe Projects::Prometheus::AlertsController do
end end
it_behaves_like 'unprivileged' it_behaves_like 'unprivileged'
it_behaves_like 'unlicensed'
it_behaves_like 'project non-specific environment', :no_content it_behaves_like 'project non-specific environment', :no_content
end end
...@@ -318,7 +303,6 @@ describe Projects::Prometheus::AlertsController do ...@@ -318,7 +303,6 @@ describe Projects::Prometheus::AlertsController do
end end
it_behaves_like 'unprivileged' it_behaves_like 'unprivileged'
it_behaves_like 'unlicensed'
it_behaves_like 'project non-specific environment', :not_found it_behaves_like 'project non-specific environment', :not_found
it_behaves_like 'project non-specific metric', :not_found it_behaves_like 'project non-specific metric', :not_found
end end
...@@ -350,7 +334,6 @@ describe Projects::Prometheus::AlertsController do ...@@ -350,7 +334,6 @@ describe Projects::Prometheus::AlertsController do
end end
it_behaves_like 'unprivileged' it_behaves_like 'unprivileged'
it_behaves_like 'unlicensed'
it_behaves_like 'project non-specific environment', :not_found it_behaves_like 'project non-specific environment', :not_found
it_behaves_like 'project non-specific metric', :not_found it_behaves_like 'project non-specific metric', :not_found
end end
......
...@@ -68,13 +68,7 @@ describe Metrics::Dashboard::GitlabAlertEmbedService do ...@@ -68,13 +68,7 @@ describe Metrics::Dashboard::GitlabAlertEmbedService do
let(:service_call) { described_class.new(*service_params).get_dashboard } let(:service_call) { described_class.new(*service_params).get_dashboard }
it_behaves_like 'misconfigured dashboard service response', :unauthorized
context 'when alerting is available' do context 'when alerting is available' do
before do
stub_licensed_features(prometheus_alerts: true)
end
it_behaves_like 'valid embedded dashboard service response' it_behaves_like 'valid embedded dashboard service response'
it_behaves_like 'raises error for users with insufficient permissions' it_behaves_like 'raises error for users with insufficient permissions'
......
...@@ -163,14 +163,6 @@ describe Projects::Operations::UpdateService do ...@@ -163,14 +163,6 @@ describe Projects::Operations::UpdateService do
context 'without an existing setting' do context 'without an existing setting' do
it_behaves_like 'setting creation' it_behaves_like 'setting creation'
context 'without license' do
before do
stub_licensed_features(prometheus_alerts: false)
end
it_behaves_like 'no operation'
end
context 'with insufficient permissions' do context 'with insufficient permissions' do
before do before do
project.add_reporter(user) project.add_reporter(user)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment