Commit 0d06e94e authored by David Fernandez's avatar David Fernandez

Merge branch '323418-verify-and-validate-your-terraform-modules-in-the-ui' into 'master'

Enable infrastructure registry

See merge request gitlab-org/gitlab!64072
parents fa597211 65d576ae
......@@ -14,7 +14,7 @@ module Projects
private
def verify_feature_enabled!
render_404 unless Feature.enabled?(:infrastructure_registry_page)
render_404 unless Feature.enabled?(:infrastructure_registry_page, default_enabled: :yaml)
end
end
end
......
- add_to_breadcrumbs _("Infrastructure Registry"), project_packages_path(@project)
- add_to_breadcrumbs @package.name, project_packages_path(@project)
- add_to_breadcrumbs _("Infrastructure Registry"), project_infrastructure_registry_index_path(@project)
- add_to_breadcrumbs @package.name, project_infrastructure_registry_index_path(@project)
- breadcrumb_title @package.version
- page_title _("Infrastructure Registry")
- @content_class = "limit-container-width" unless fluid_layout
......
......@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/326460
milestone: '13.11'
type: development
group: group::package
default_enabled: false
default_enabled: true
......@@ -58,7 +58,7 @@ module Sidebars
end
def infrastructure_registry_menu_item
if Feature.disabled?(:infrastructure_registry_page, context.current_user)
if Feature.disabled?(:infrastructure_registry_page, context.current_user, default_enabled: :yaml)
return ::Sidebars::NilMenuItem.new(item_id: :infrastructure_registry)
end
......
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Projects::Packages::InfrastructureRegistryController do
let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project, :private) }
let(:params) { { namespace_id: project.namespace, project_id: project } }
before do
sign_in(user)
project.add_maintainer(user)
end
describe 'GET #index' do
subject { get :index, params: params, format: :html }
it_behaves_like 'returning response status', :ok
context 'when the feature is disabled' do
before do
stub_feature_flags(infrastructure_registry_page: false)
end
it_behaves_like 'returning response status', :not_found
end
end
describe 'GET #show' do
let_it_be(:terraform_module) { create(:terraform_module_package, project: project) }
subject { get :show, params: params.merge(id: terraform_module.id), format: :html }
it_behaves_like 'returning response status', :ok
context 'when the feature is disabled' do
before do
stub_feature_flags(infrastructure_registry_page: false)
end
it_behaves_like 'returning response status', :not_found
end
end
end
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