Commit da8419a1 authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg

License detection happens soley through Gitaly now

Migration: https://gitlab.com/gitlab-org/gitaly/issues/1026

Conflicts:
	lib/gitlab/git/repository.rb
parent 0f18d489
......@@ -1054,18 +1054,8 @@ module Gitlab
end
def license_short_name
gitaly_migrate(:license_short_name,
status: Gitlab::GitalyClient::MigrationStatus::OPT_OUT) do |is_enabled|
if is_enabled
wrapped_gitaly_errors do
gitaly_repository_client.license_short_name
else
begin
# The licensee gem creates a Rugged object from the path:
# https://github.com/benbalter/licensee/blob/v8.7.0/lib/licensee/projects/git_project.rb
Licensee.license(path).try(:key)
rescue Rugged::Error
end
end
end
end
......
......@@ -1727,7 +1727,6 @@ describe Gitlab::Git::Repository, seed_helper: true do
end
describe '#license_short_name' do
shared_examples 'acquiring the Licensee license key' do
subject { repository.license_short_name }
context 'when no license file can be found' do
......@@ -1746,15 +1745,6 @@ describe Gitlab::Git::Repository, seed_helper: true do
end
end
context 'when gitaly is enabled' do
it_behaves_like 'acquiring the Licensee license key'
end
context 'when gitaly is disabled', :disable_gitaly do
it_behaves_like 'acquiring the Licensee license key'
end
end
describe '#with_repo_branch_commit' do
context 'when comparing with the same repository' do
let(:start_repository) { repository }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment