diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-19 03:09:12 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-19 03:09:12 +0300 |
commit | b9f288cdfa03f429ebdb03320c5eed9778af0795 (patch) | |
tree | 4c21e2583416ba802a17abdd6b74feb7dd3a75e1 /spec/models | |
parent | d7b7232142ffcca72b37f2da76d10a31af4cca94 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/performance_monitoring/prometheus_dashboard_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/models/performance_monitoring/prometheus_dashboard_spec.rb b/spec/models/performance_monitoring/prometheus_dashboard_spec.rb index ef7298c3d8c..a56903e51fd 100644 --- a/spec/models/performance_monitoring/prometheus_dashboard_spec.rb +++ b/spec/models/performance_monitoring/prometheus_dashboard_spec.rb @@ -50,19 +50,19 @@ describe PerformanceMonitoring::PrometheusDashboard do context 'dashboard content is missing' do let(:json_content) { nil } - it_behaves_like 'validation failed', panel_groups: ["can't be blank"], dashboard: ["can't be blank"] + it_behaves_like 'validation failed', panel_groups: ["should be an array of panel_groups objects"], dashboard: ["can't be blank"] end context 'dashboard content is NOT a hash' do let(:json_content) { YAML.safe_load("'test'") } - it_behaves_like 'validation failed', panel_groups: ["can't be blank"], dashboard: ["can't be blank"] + it_behaves_like 'validation failed', panel_groups: ["should be an array of panel_groups objects"], dashboard: ["can't be blank"] end context 'content is an array' do let(:json_content) { [{ "dashboard" => "Dashboard Title" }] } - it_behaves_like 'validation failed', panel_groups: ["can't be blank"], dashboard: ["can't be blank"] + it_behaves_like 'validation failed', panel_groups: ["should be an array of panel_groups objects"], dashboard: ["can't be blank"] end context 'dashboard definition is missing panels_groups and dashboard keys' do @@ -72,7 +72,7 @@ describe PerformanceMonitoring::PrometheusDashboard do } end - it_behaves_like 'validation failed', panel_groups: ["can't be blank"], dashboard: ["can't be blank"] + it_behaves_like 'validation failed', panel_groups: ["should be an array of panel_groups objects"], dashboard: ["can't be blank"] end context 'group definition is missing panels and group keys' do @@ -88,7 +88,7 @@ describe PerformanceMonitoring::PrometheusDashboard do } end - it_behaves_like 'validation failed', panels: ["can't be blank"], group: ["can't be blank"] + it_behaves_like 'validation failed', panels: ["should be an array of panels objects"], group: ["can't be blank"] end context 'panel definition is missing metrics and title keys' do @@ -110,7 +110,7 @@ describe PerformanceMonitoring::PrometheusDashboard do } end - it_behaves_like 'validation failed', metrics: ["can't be blank"], title: ["can't be blank"] + it_behaves_like 'validation failed', metrics: ["should be an array of metrics objects"], title: ["can't be blank"] end context 'metrics definition is missing unit, query and query_range keys' do @@ -180,7 +180,7 @@ describe PerformanceMonitoring::PrometheusDashboard do describe '.find_for' do let(:project) { build_stubbed(:project) } let(:user) { build_stubbed(:user) } - let(:environment) { build_stubbed(:environment) } + let(:environment) { build_stubbed(:environment, project: project) } let(:path) { ::Metrics::Dashboard::SystemDashboardService::DASHBOARD_PATH } context 'dashboard has been found' do |