Commit dbe79c49 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch 'unleash-use-client-features' into 'master'

Support `/client/features` Unleash endpoint

Closes #8119

See merge request gitlab-org/gitlab-ee!8045
parents 86f24489 b188351f
---
title: Support `/client/features` Unleash endpoint
merge_request: 8045
author:
type: fixed
......@@ -19,10 +19,16 @@ module API
status :ok
end
desc 'Get a list of features (deprecated, v2 client support)'
get 'features' do
present project, with: ::EE::API::Entities::UnleashFeatures
end
desc 'Get a list of features'
get 'client/features' do
present project, with: ::EE::API::Entities::UnleashFeatures
end
post 'client/register' do
# not supported yet
status :ok
......
......@@ -66,7 +66,10 @@ describe API::Unleash do
end
end
describe 'GET /feature_flags/unleash/:project_id/features' do
%w(/feature_flags/unleash/:project_id/features /feature_flags/unleash/:project_id/client/features).each do |features_endpoint|
describe "GET #{features_endpoint}" do
let(:features_url) { features_endpoint.sub(':project_id', project_id) }
subject { get api("/feature_flags/unleash/#{project_id}/features"), params, headers }
it_behaves_like 'authenticated request'
......@@ -94,6 +97,7 @@ describe API::Unleash do
end
end
end
end
describe 'POST /feature_flags/unleash/:project_id/client/register' do
subject { post api("/feature_flags/unleash/#{project_id}/client/register"), params, headers }
......
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