Commit b7597374 authored by Matthias Käppler's avatar Matthias Käppler

Merge branch '333069-replace-legacy-license-value-with-license_file' into 'master'

Rename License::LEGACY_LICENSE_TYPE to License::LICENSE_FILE_TYPE

See merge request gitlab-org/gitlab!64060
parents 722b2b4e fd5788e2
......@@ -88,7 +88,7 @@ export const subscriptionSyncStatus = {
};
export const subscriptionTypes = {
CLOUD: 'cloud',
LICENSE_FILE: 'legacy',
LICENSE_FILE: 'license_file',
};
export const subscriptionQueries = {
......
......@@ -8,7 +8,7 @@ class License < ApplicationRecord
PREMIUM_PLAN = 'premium'
ULTIMATE_PLAN = 'ultimate'
CLOUD_LICENSE_TYPE = 'cloud'
LEGACY_LICENSE_TYPE = 'legacy'
LICENSE_FILE_TYPE = 'license_file'
ALLOWED_PERCENTAGE_OF_USERS_OVERAGE = (10 / 100.0)
EE_ALL_PLANS = [STARTER_PLAN, PREMIUM_PLAN, ULTIMATE_PLAN].freeze
......@@ -561,7 +561,7 @@ class License < ApplicationRecord
end
def license_type
cloud_license? ? CLOUD_LICENSE_TYPE : LEGACY_LICENSE_TYPE
cloud_license? ? CLOUD_LICENSE_TYPE : LICENSE_FILE_TYPE
end
def auto_renew
......
......@@ -1459,7 +1459,7 @@ RSpec.describe License do
subject { license.license_type }
context 'when the license is not a cloud license' do
it { is_expected.to eq(described_class::LEGACY_LICENSE_TYPE) }
it { is_expected.to eq(described_class::LICENSE_FILE_TYPE) }
end
context 'when the license is a cloud license' do
......
......@@ -53,7 +53,7 @@ RSpec.describe 'Activate a subscription' do
expect(mutation_response['license']).to eq(
{
'id' => "gid://gitlab/License/#{created_license.id}",
'type' => License::LEGACY_LICENSE_TYPE,
'type' => License::LICENSE_FILE_TYPE,
'plan' => created_license.plan,
'name' => created_license.licensee_name,
'email' => created_license.licensee_email,
......
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