Skip to content

Redefine const ALL_FEATURES in JH

Baodong请求将fix/redefine_const_all_features合并到main-jh

Related issue link: #1089 (closed)

What does this MR do

ee/spec/support/helpers/ee/license_helpers.rb

      def stub_licensed_features(features)
        missing_features = features.keys.map(&:to_sym) - GitlabSubscriptions::Features::ALL_FEATURES

        if missing_features.any?
          subject = missing_features.join(', ')
          noun = 'feature'.pluralize(missing_features.size)
          raise ArgumentError, "#{subject} should be defined as licensed #{noun}"
        end

      # ...

stub_licensed_features is a helper method that helps mock feature license in test environment,

it depends on GitlabSubscriptions::Features::ALL_FEATURES .

Re-define ALL_FEATURES in JH to allow JH specific features to be found.


cc EM @prajnamas

Baodong 编辑于

合并请求报告

加载中