diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-22 18:09:31 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-22 18:09:31 +0300 |
commit | 06d4ce7ee0c0f9cf84a6799d97f64dd710d6e9f6 (patch) | |
tree | 6c975e5931ee5655f2aa9dbb0c087604d513ec5a /spec/requests/api | |
parent | cea25900b73fcb7029845eeca5e5a9170349f1dd (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests/api')
-rw-r--r-- | spec/requests/api/api_spec.rb | 6 | ||||
-rw-r--r-- | spec/requests/api/ci/runner/jobs_artifacts_spec.rb | 6 | ||||
-rw-r--r-- | spec/requests/api/ci/runner/jobs_put_spec.rb | 2 | ||||
-rw-r--r-- | spec/requests/api/ci/runner/jobs_trace_spec.rb | 2 | ||||
-rw-r--r-- | spec/requests/api/internal/base_spec.rb | 6 |
5 files changed, 11 insertions, 11 deletions
diff --git a/spec/requests/api/api_spec.rb b/spec/requests/api/api_spec.rb index 7e670724c11..b3e425630e5 100644 --- a/spec/requests/api/api_spec.rb +++ b/spec/requests/api/api_spec.rb @@ -107,7 +107,7 @@ RSpec.describe API::API do allow_any_instance_of(Gitlab::GrapeLogging::Loggers::ContextLogger).to receive(:parameters) do Gitlab::ApplicationContext.current.tap do |log_context| expect(log_context).to match('correlation_id' => an_instance_of(String), - 'meta.caller_id' => '/api/:version/projects/:id/issues', + 'meta.caller_id' => 'GET /api/:version/projects/:id/issues', 'meta.remote_ip' => an_instance_of(String), 'meta.project' => project.full_path, 'meta.root_namespace' => project.namespace.full_path, @@ -124,7 +124,7 @@ RSpec.describe API::API do allow_any_instance_of(Gitlab::GrapeLogging::Loggers::ContextLogger).to receive(:parameters) do Gitlab::ApplicationContext.current.tap do |log_context| expect(log_context).to match('correlation_id' => an_instance_of(String), - 'meta.caller_id' => '/api/:version/users', + 'meta.caller_id' => 'GET /api/:version/users', 'meta.remote_ip' => an_instance_of(String), 'meta.client_id' => an_instance_of(String), 'meta.feature_category' => 'users') @@ -141,7 +141,7 @@ RSpec.describe API::API do let(:component_map) do { "application" => "test", - "endpoint_id" => "/api/:version/users/:id" + "endpoint_id" => "GET /api/:version/users/:id" } end diff --git a/spec/requests/api/ci/runner/jobs_artifacts_spec.rb b/spec/requests/api/ci/runner/jobs_artifacts_spec.rb index 9369b6aa464..49ccdccb7c8 100644 --- a/spec/requests/api/ci/runner/jobs_artifacts_spec.rb +++ b/spec/requests/api/ci/runner/jobs_artifacts_spec.rb @@ -127,7 +127,7 @@ RSpec.describe API::Ci::Runner, :clean_gitlab_redis_shared_state do authorize_artifacts_with_token_in_params end - it_behaves_like 'API::CI::Runner application context metadata', '/api/:version/jobs/:id/artifacts/authorize' do + it_behaves_like 'API::CI::Runner application context metadata', 'POST /api/:version/jobs/:id/artifacts/authorize' do let(:send_request) { subject } end @@ -262,7 +262,7 @@ RSpec.describe API::Ci::Runner, :clean_gitlab_redis_shared_state do end describe 'POST /api/v4/jobs/:id/artifacts' do - it_behaves_like 'API::CI::Runner application context metadata', '/api/:version/jobs/:id/artifacts' do + it_behaves_like 'API::CI::Runner application context metadata', 'POST /api/:version/jobs/:id/artifacts' do let(:send_request) do upload_artifacts(file_upload, headers_with_token) end @@ -784,7 +784,7 @@ RSpec.describe API::Ci::Runner, :clean_gitlab_redis_shared_state do describe 'GET /api/v4/jobs/:id/artifacts' do let(:token) { job.token } - it_behaves_like 'API::CI::Runner application context metadata', '/api/:version/jobs/:id/artifacts' do + it_behaves_like 'API::CI::Runner application context metadata', 'GET /api/:version/jobs/:id/artifacts' do let(:send_request) { download_artifact } end diff --git a/spec/requests/api/ci/runner/jobs_put_spec.rb b/spec/requests/api/ci/runner/jobs_put_spec.rb index b5d2c4608c5..324419af7e5 100644 --- a/spec/requests/api/ci/runner/jobs_put_spec.rb +++ b/spec/requests/api/ci/runner/jobs_put_spec.rb @@ -36,7 +36,7 @@ RSpec.describe API::Ci::Runner, :clean_gitlab_redis_shared_state do job.run! end - it_behaves_like 'API::CI::Runner application context metadata', '/api/:version/jobs/:id' do + it_behaves_like 'API::CI::Runner application context metadata', 'PUT /api/:version/jobs/:id' do let(:send_request) { update_job(state: 'success') } end diff --git a/spec/requests/api/ci/runner/jobs_trace_spec.rb b/spec/requests/api/ci/runner/jobs_trace_spec.rb index 659cf055023..d566c3b5032 100644 --- a/spec/requests/api/ci/runner/jobs_trace_spec.rb +++ b/spec/requests/api/ci/runner/jobs_trace_spec.rb @@ -41,7 +41,7 @@ RSpec.describe API::Ci::Runner, :clean_gitlab_redis_shared_state do initial_patch_the_trace end - it_behaves_like 'API::CI::Runner application context metadata', '/api/:version/jobs/:id/trace' do + it_behaves_like 'API::CI::Runner application context metadata', 'PATCH /api/:version/jobs/:id/trace' do let(:send_request) { patch_the_trace } end diff --git a/spec/requests/api/internal/base_spec.rb b/spec/requests/api/internal/base_spec.rb index d9d021ba758..c4420c332c7 100644 --- a/spec/requests/api/internal/base_spec.rb +++ b/spec/requests/api/internal/base_spec.rb @@ -644,7 +644,7 @@ RSpec.describe API::Internal::Base do context 'with Project' do it_behaves_like 'storing arguments in the application context' do - let(:expected_params) { { user: key.user.username, project: project.full_path } } + let(:expected_params) { { user: key.user.username, project: project.full_path, caller_id: "POST /api/:version/internal/allowed" } } subject { push(key, project) } end @@ -652,7 +652,7 @@ RSpec.describe API::Internal::Base do context 'with PersonalSnippet' do it_behaves_like 'storing arguments in the application context' do - let(:expected_params) { { user: key.user.username } } + let(:expected_params) { { user: key.user.username, caller_id: "POST /api/:version/internal/allowed" } } subject { push(key, personal_snippet) } end @@ -660,7 +660,7 @@ RSpec.describe API::Internal::Base do context 'with ProjectSnippet' do it_behaves_like 'storing arguments in the application context' do - let(:expected_params) { { user: key.user.username, project: project_snippet.project.full_path } } + let(:expected_params) { { user: key.user.username, project: project_snippet.project.full_path, caller_id: "POST /api/:version/internal/allowed" } } subject { push(key, project_snippet) } end |