diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-08 21:09:50 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-08 21:09:50 +0000 |
commit | 76358aee81a471a5e71eaf3e8c2d91b7c9a0a5a9 (patch) | |
tree | df9ba3dcc09eb404de31e0d79cb8f0b77812e655 /spec/requests/api | |
parent | 80e9fdc9682cfbcfb9202a2733605a6a6bd23f05 (diff) | |
download | gitlab-ce-76358aee81a471a5e71eaf3e8c2d91b7c9a0a5a9.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests/api')
-rw-r--r-- | spec/requests/api/internal/base_spec.rb | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/spec/requests/api/internal/base_spec.rb b/spec/requests/api/internal/base_spec.rb index f84336b64c2..0629d51154b 100644 --- a/spec/requests/api/internal/base_spec.rb +++ b/spec/requests/api/internal/base_spec.rb @@ -882,88 +882,6 @@ describe API::Internal::Base do end end - # TODO: Uncomment when the end-point is reenabled - # describe 'POST /notify_post_receive' do - # let(:valid_params) do - # { project: project.repository.path, secret_token: secret_token } - # end - # - # let(:valid_wiki_params) do - # { project: project.wiki.repository.path, secret_token: secret_token } - # end - # - # before do - # allow(Gitlab.config.gitaly).to receive(:enabled).and_return(true) - # end - # - # it "calls the Gitaly client with the project's repository" do - # expect(Gitlab::GitalyClient::NotificationService). - # to receive(:new).with(gitlab_git_repository_with(path: project.repository.path)). - # and_call_original - # expect_any_instance_of(Gitlab::GitalyClient::NotificationService). - # to receive(:post_receive) - # - # post api("/internal/notify_post_receive"), valid_params - # - # expect(response).to have_gitlab_http_status(:ok) - # end - # - # it "calls the Gitaly client with the wiki's repository if it's a wiki" do - # expect(Gitlab::GitalyClient::NotificationService). - # to receive(:new).with(gitlab_git_repository_with(path: project.wiki.repository.path)). - # and_call_original - # expect_any_instance_of(Gitlab::GitalyClient::NotificationService). - # to receive(:post_receive) - # - # post api("/internal/notify_post_receive"), valid_wiki_params - # - # expect(response).to have_gitlab_http_status(:ok) - # end - # - # it "returns 500 if the gitaly call fails" do - # expect_any_instance_of(Gitlab::GitalyClient::NotificationService). - # to receive(:post_receive).and_raise(GRPC::Unavailable) - # - # post api("/internal/notify_post_receive"), valid_params - # - # expect(response).to have_gitlab_http_status(:internal_server_error) - # end - # - # context 'with a gl_repository parameter' do - # let(:valid_params) do - # { gl_repository: "project-#{project.id}", secret_token: secret_token } - # end - # - # let(:valid_wiki_params) do - # { gl_repository: "wiki-#{project.id}", secret_token: secret_token } - # end - # - # it "calls the Gitaly client with the project's repository" do - # expect(Gitlab::GitalyClient::NotificationService). - # to receive(:new).with(gitlab_git_repository_with(path: project.repository.path)). - # and_call_original - # expect_any_instance_of(Gitlab::GitalyClient::NotificationService). - # to receive(:post_receive) - # - # post api("/internal/notify_post_receive"), valid_params - # - # expect(response).to have_gitlab_http_status(:ok) - # end - # - # it "calls the Gitaly client with the wiki's repository if it's a wiki" do - # expect(Gitlab::GitalyClient::NotificationService). - # to receive(:new).with(gitlab_git_repository_with(path: project.wiki.repository.path)). - # and_call_original - # expect_any_instance_of(Gitlab::GitalyClient::NotificationService). - # to receive(:post_receive) - # - # post api("/internal/notify_post_receive"), valid_wiki_params - # - # expect(response).to have_gitlab_http_status(:ok) - # end - # end - # end - describe 'POST /internal/post_receive', :clean_gitlab_redis_shared_state do let(:identifier) { 'key-123' } let(:branch_name) { 'feature' } |