Commit cb4aae5f authored by Michael Kozono's avatar Michael Kozono

Merge branch '8248-remove-conan-feature-flag' into 'master'

Remove conan package registry feature flag

See merge request gitlab-org/gitlab!21152
parents 5631a464 dc0fdadf
---
title: Add support for Conan package management in the package registry
merge_request: 21152
author:
type: added
......@@ -13,8 +13,6 @@ module Packages
end
def execute
return ServiceResponse.error(message: 'not found', http_status: :not_found) unless feature_available?
ServiceResponse.success(payload: { results: search_results })
end
......@@ -38,10 +36,6 @@ module Packages
sanitized_query
end
def feature_available?
Feature.enabled?(:conan_package_registry)
end
def search_packages(query)
Packages::ConanPackageFinder.new(current_user, query: query).execute.map(&:conan_recipe)
end
......
......@@ -27,7 +27,6 @@ module API
CONAN_REVISION_REGEX = Gitlab::Regex.conan_revision_regex
before do
not_found! unless Feature.enabled?(:conan_package_registry)
require_packages_enabled!
# Personal access token will be extracted from Bearer or Basic authorization
......
......@@ -31,19 +31,6 @@ describe API::ConanPackages do
end
describe 'GET /api/v4/packages/conan/v1/ping' do
context 'feature flag disabled' do
before do
stub_feature_flags(conan_package_registry: false)
end
it 'responds with 404 Not Found' do
get api('/packages/conan/v1/ping')
expect(response).to have_gitlab_http_status(:not_found)
end
end
context 'feature flag enabled' do
it 'responds with 401 Unauthorized when no token provided' do
get api('/packages/conan/v1/ping')
......@@ -94,7 +81,6 @@ describe API::ConanPackages do
end
end
end
end
describe 'GET /api/v4/packages/conan/v1/conans/search' do
before do
......
......@@ -15,21 +15,6 @@ describe Packages::Conan::SearchService do
end
describe '#execute' do
context 'feature unavailable' do
let(:query) { '' }
before do
stub_feature_flags(conan_package_registry: false)
end
it 'responds with 404 not found' do
result = subject.execute
expect(result.http_status).to eq :not_found
expect(result.message).to eq('not found')
end
end
context 'with wildcard' do
let(:partial_name) { conan_package.name.first[0, 3] }
let(:query) { "#{partial_name}*" }
......
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