summaryrefslogtreecommitdiff
path: root/spec/gitlab_shell_lfs_authentication_spec.rb
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2019-10-14 16:23:59 +0100
committerNick Thomas <nick@gitlab.com>2019-10-15 07:44:13 +0100
commite14cc772480d51abf647daf61139929a73ddc72c (patch)
tree642d9ec4ec8676ba0c3a3caad9ccabca599deb95 /spec/gitlab_shell_lfs_authentication_spec.rb
parent18096b5440e0818605add32538751c6be38e8343 (diff)
downloadgitlab-shell-e14cc772480d51abf647daf61139929a73ddc72c.tar.gz
Simplify integration specs
Diffstat (limited to 'spec/gitlab_shell_lfs_authentication_spec.rb')
-rw-r--r--spec/gitlab_shell_lfs_authentication_spec.rb31
1 files changed, 6 insertions, 25 deletions
diff --git a/spec/gitlab_shell_lfs_authentication_spec.rb b/spec/gitlab_shell_lfs_authentication_spec.rb
index 7cdb320..d27f50a 100644
--- a/spec/gitlab_shell_lfs_authentication_spec.rb
+++ b/spec/gitlab_shell_lfs_authentication_spec.rb
@@ -6,6 +6,11 @@ describe 'bin/gitlab-shell git-lfs-authentication' do
include_context 'gitlab shell'
let(:path) { "https://gitlab.com/repo/path" }
+ let(:env) { {'SSH_CONNECTION' => 'fake', 'SSH_ORIGINAL_COMMAND' => 'git-lfs-authenticate project/repo download' } }
+
+ before(:context) do
+ write_config("gitlab_url" => "http+unix://#{CGI.escape(tmp_socket_path)}")
+ end
def mock_server(server)
server.mount_proc('/api/v4/internal/lfs_authenticate') do |req, res|
@@ -49,7 +54,7 @@ describe 'bin/gitlab-shell git-lfs-authentication' do
end
end
- shared_examples 'lfs authentication command' do
+ describe 'lfs authentication command' do
def successful_response
{
"header" => {
@@ -119,28 +124,4 @@ describe 'bin/gitlab-shell git-lfs-authentication' do
end
end
end
-
- let(:env) { {'SSH_CONNECTION' => 'fake', 'SSH_ORIGINAL_COMMAND' => 'git-lfs-authenticate project/repo download' } }
-
- describe 'without go features' do
- before(:context) do
- write_config(
- "gitlab_url" => "http+unix://#{CGI.escape(tmp_socket_path)}",
- )
- end
-
- it_behaves_like 'lfs authentication command'
- end
-
- describe 'with go features' do
- before(:context) do
- write_config(
- "gitlab_url" => "http+unix://#{CGI.escape(tmp_socket_path)}",
- "migration" => { "enabled" => true,
- "features" => ["git-lfs-authenticate"] }
- )
- end
-
- it_behaves_like 'lfs authentication command'
- end
end