diff options
author | Jacob Vosmaer (GitLab) <jacob@gitlab.com> | 2018-01-22 16:51:47 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-01-22 16:51:47 +0000 |
commit | 583cff8d61f297fd12daabbd92adc4c05052519c (patch) | |
tree | 6d31d82ed946367b0315f6127d23da53b7902e45 /spec | |
parent | 32e41b5f0c299e73f9435df4da8b934e69782b3c (diff) | |
download | gitlab-ce-583cff8d61f297fd12daabbd92adc4c05052519c.tar.gz |
Default to Gitaly for 'git push' HTTP/SSH, and make Gitaly mandatory for SSH pull
Diffstat (limited to 'spec')
-rw-r--r-- | spec/requests/api/internal_spec.rb | 41 |
1 files changed, 13 insertions, 28 deletions
diff --git a/spec/requests/api/internal_spec.rb b/spec/requests/api/internal_spec.rb index 2783c51b8df..884a258fd12 100644 --- a/spec/requests/api/internal_spec.rb +++ b/spec/requests/api/internal_spec.rb @@ -317,35 +317,20 @@ describe API::Internal do end context "git pull" do - context "gitaly disabled", :disable_gitaly do - it "has the correct payload" do - pull(key, project) - - expect(response).to have_gitlab_http_status(200) - expect(json_response["status"]).to be_truthy - expect(json_response["repository_path"]).to eq(project.repository.path_to_repo) - expect(json_response["gl_repository"]).to eq("project-#{project.id}") - expect(json_response["gitaly"]).to be_nil - expect(user).to have_an_activity_record - end - end - - context "gitaly enabled" do - it "has the correct payload" do - pull(key, project) + it "has the correct payload" do + pull(key, project) - expect(response).to have_gitlab_http_status(200) - expect(json_response["status"]).to be_truthy - expect(json_response["repository_path"]).to eq(project.repository.path_to_repo) - expect(json_response["gl_repository"]).to eq("project-#{project.id}") - expect(json_response["gitaly"]).not_to be_nil - expect(json_response["gitaly"]["repository"]).not_to be_nil - expect(json_response["gitaly"]["repository"]["storage_name"]).to eq(project.repository.gitaly_repository.storage_name) - expect(json_response["gitaly"]["repository"]["relative_path"]).to eq(project.repository.gitaly_repository.relative_path) - expect(json_response["gitaly"]["address"]).to eq(Gitlab::GitalyClient.address(project.repository_storage)) - expect(json_response["gitaly"]["token"]).to eq(Gitlab::GitalyClient.token(project.repository_storage)) - expect(user).to have_an_activity_record - end + expect(response).to have_gitlab_http_status(200) + expect(json_response["status"]).to be_truthy + expect(json_response["repository_path"]).to eq(project.repository.path_to_repo) + expect(json_response["gl_repository"]).to eq("project-#{project.id}") + expect(json_response["gitaly"]).not_to be_nil + expect(json_response["gitaly"]["repository"]).not_to be_nil + expect(json_response["gitaly"]["repository"]["storage_name"]).to eq(project.repository.gitaly_repository.storage_name) + expect(json_response["gitaly"]["repository"]["relative_path"]).to eq(project.repository.gitaly_repository.relative_path) + expect(json_response["gitaly"]["address"]).to eq(Gitlab::GitalyClient.address(project.repository_storage)) + expect(json_response["gitaly"]["token"]).to eq(Gitlab::GitalyClient.token(project.repository_storage)) + expect(user).to have_an_activity_record end end |