diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-30 18:07:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-30 18:07:51 +0300 |
commit | 4e9acbfba3682c552b3de707c535e6257ef41054 (patch) | |
tree | 8b1fd5f89ad3f1be68d8944815b13bb7d498e4a6 /spec/services | |
parent | 506d6dcd7c787ba71a8a53102f3d4fdb6adcfa5e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/metrics/dashboard/clone_dashboard_service_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/services/metrics/dashboard/clone_dashboard_service_spec.rb b/spec/services/metrics/dashboard/clone_dashboard_service_spec.rb index 6f7250037cd..b386159541a 100644 --- a/spec/services/metrics/dashboard/clone_dashboard_service_spec.rb +++ b/spec/services/metrics/dashboard/clone_dashboard_service_spec.rb @@ -29,7 +29,7 @@ describe Metrics::Dashboard::CloneDashboardService, :use_clean_rails_memory_stor end context 'user does not have push right to repository' do - it_behaves_like 'misconfigured dashboard service response', :forbidden, %q(You are not allowed to push into this branch. Create another branch or open a merge request.) + it_behaves_like 'misconfigured dashboard service response with stepable', :forbidden, 'You are not allowed to push into this branch. Create another branch or open a merge request.' end context 'with rights to push to the repository' do @@ -40,19 +40,19 @@ describe Metrics::Dashboard::CloneDashboardService, :use_clean_rails_memory_stor context 'wrong target file extension' do let(:file_name) { 'custom_dashboard.txt' } - it_behaves_like 'misconfigured dashboard service response', :bad_request, 'The file name should have a .yml extension' + it_behaves_like 'misconfigured dashboard service response with stepable', :bad_request, 'The file name should have a .yml extension' end context 'wrong source dashboard file' do let(:dashboard) { 'config/prometheus/common_metrics_123.yml' } - it_behaves_like 'misconfigured dashboard service response', :not_found, 'Not found.' + it_behaves_like 'misconfigured dashboard service response with stepable', :not_found, 'Not found.' end context 'path traversal attack attempt' do let(:dashboard) { 'config/prometheus/../database.yml' } - it_behaves_like 'misconfigured dashboard service response', :not_found, 'Not found.' + it_behaves_like 'misconfigured dashboard service response with stepable', :not_found, 'Not found.' end context 'path traversal attack attempt on target file' do @@ -92,7 +92,7 @@ describe Metrics::Dashboard::CloneDashboardService, :use_clean_rails_memory_stor project.repository.add_branch(user, branch, 'master') end - it_behaves_like 'misconfigured dashboard service response', :bad_request, "There was an error creating the dashboard, branch named: existing_branch already exists." + it_behaves_like 'misconfigured dashboard service response with stepable', :bad_request, 'There was an error creating the dashboard, branch named: existing_branch already exists.' # temporary not available function for first iteration # follow up issue https://gitlab.com/gitlab-org/gitlab/issues/196237 which @@ -111,7 +111,7 @@ describe Metrics::Dashboard::CloneDashboardService, :use_clean_rails_memory_stor context 'blank branch name' do let(:branch) { '' } - it_behaves_like 'misconfigured dashboard service response', :bad_request, 'There was an error creating the dashboard, branch name is invalid.' + it_behaves_like 'misconfigured dashboard service response with stepable', :bad_request, 'There was an error creating the dashboard, branch name is invalid.' end context 'dashboard file already exists' do @@ -129,7 +129,7 @@ describe Metrics::Dashboard::CloneDashboardService, :use_clean_rails_memory_stor ).execute end - it_behaves_like 'misconfigured dashboard service response', :bad_request, "A file with 'custom_dashboard.yml' already exists in custom_dashboard branch" + it_behaves_like 'misconfigured dashboard service response with stepable', :bad_request, "A file with 'custom_dashboard.yml' already exists in custom_dashboard branch" end it 'extends dashboard template path to absolute url' do |