Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
35eda894
Commit
35eda894
authored
Nov 03, 2021
by
Etienne Baqué
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed new_customersdot_staging_url feature flag
Updated tests accordingly. Changelog: other
parent
e1d2685e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
38 deletions
+16
-38
config/feature_flags/development/new_customersdot_staging_url.yml
...eature_flags/development/new_customersdot_staging_url.yml
+0
-8
ee/spec/features/billings/billing_plans_spec.rb
ee/spec/features/billings/billing_plans_spec.rb
+0
-1
ee/spec/features/groups/billing_spec.rb
ee/spec/features/groups/billing_spec.rb
+0
-4
ee/spec/helpers/billing_plans_helper_spec.rb
ee/spec/helpers/billing_plans_helper_spec.rb
+0
-4
lib/gitlab/subscription_portal.rb
lib/gitlab/subscription_portal.rb
+1
-5
spec/lib/gitlab/subscription_portal_spec.rb
spec/lib/gitlab/subscription_portal_spec.rb
+15
-16
No files found.
config/feature_flags/development/new_customersdot_staging_url.yml
deleted
100644 → 0
View file @
e1d2685e
---
name
:
new_customersdot_staging_url
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/71827
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/342513
milestone
:
'
14.4'
type
:
development
group
:
group::fulfillment
default_enabled
:
false
ee/spec/features/billings/billing_plans_spec.rb
View file @
35eda894
...
...
@@ -19,7 +19,6 @@ RSpec.describe 'Billing plan pages', :feature, :js do
stub_feature_flags
(
show_billing_eoa_banner:
true
)
stub_feature_flags
(
hide_deprecated_billing_plans:
false
)
stub_feature_flags
(
new_customersdot_staging_url:
false
)
stub_billing_plans
(
nil
)
stub_billing_plans
(
namespace
.
id
,
plan
.
name
,
plans_data
.
to_json
)
...
...
ee/spec/features/groups/billing_spec.rb
View file @
35eda894
...
...
@@ -70,10 +70,6 @@ RSpec.describe 'Groups > Billing', :js, :saas do
create
(
:gitlab_subscription
,
end_date:
Date
.
today
+
14
.
days
,
namespace:
group
,
hosted_plan:
bronze_plan
,
seats:
15
)
end
before
do
stub_feature_flags
(
new_customersdot_staging_url:
false
)
end
it_behaves_like
'hides search settings'
it
'shows the proper title and subscription data'
do
...
...
ee/spec/helpers/billing_plans_helper_spec.rb
View file @
35eda894
...
...
@@ -5,10 +5,6 @@ require 'spec_helper'
RSpec
.
describe
BillingPlansHelper
,
:saas
do
include
Devise
::
Test
::
ControllerHelpers
before
do
stub_feature_flags
(
new_customersdot_staging_url:
false
)
end
describe
'#subscription_plan_data_attributes'
do
let
(
:group
)
{
build
(
:group
)
}
let
(
:customer_portal_url
)
{
EE
::
SUBSCRIPTIONS_MANAGE_URL
}
...
...
lib/gitlab/subscription_portal.rb
View file @
35eda894
...
...
@@ -4,11 +4,7 @@ module Gitlab
module
SubscriptionPortal
def
self
.
default_subscriptions_url
if
::
Gitlab
.
dev_or_test_env?
if
Feature
.
enabled?
(
:new_customersdot_staging_url
,
default_enabled: :yaml
)
'https://customers.staging.gitlab.com'
else
'https://customers.stg.gitlab.com'
end
'https://customers.staging.gitlab.com'
else
'https://customers.gitlab.com'
end
...
...
spec/lib/gitlab/subscription_portal_spec.rb
View file @
35eda894
...
...
@@ -9,14 +9,13 @@ RSpec.describe ::Gitlab::SubscriptionPortal do
before
do
stub_env
(
'CUSTOMER_PORTAL_URL'
,
env_value
)
stub_feature_flags
(
new_customersdot_staging_url:
false
)
end
describe
'.default_subscriptions_url'
do
where
(
:test
,
:development
,
:result
)
do
false
|
false
|
'https://customers.gitlab.com'
false
|
true
|
'https://customers.stg.gitlab.com'
true
|
false
|
'https://customers.stg.gitlab.com'
false
|
true
|
'https://customers.st
agin
g.gitlab.com'
true
|
false
|
'https://customers.st
agin
g.gitlab.com'
end
before
do
...
...
@@ -35,7 +34,7 @@ RSpec.describe ::Gitlab::SubscriptionPortal do
subject
{
described_class
.
subscriptions_url
}
context
'when CUSTOMER_PORTAL_URL ENV is unset'
do
it
{
is_expected
.
to
eq
(
'https://customers.stg.gitlab.com'
)
}
it
{
is_expected
.
to
eq
(
'https://customers.st
agin
g.gitlab.com'
)
}
end
context
'when CUSTOMER_PORTAL_URL ENV is set'
do
...
...
@@ -55,15 +54,15 @@ RSpec.describe ::Gitlab::SubscriptionPortal do
context
'url methods'
do
where
(
:method_name
,
:result
)
do
:default_subscriptions_url
|
'https://customers.stg.gitlab.com'
:payment_form_url
|
'https://customers.stg.gitlab.com/payment_forms/cc_validation'
:subscriptions_graphql_url
|
'https://customers.stg.gitlab.com/graphql'
:subscriptions_more_minutes_url
|
'https://customers.stg.gitlab.com/buy_pipeline_minutes'
:subscriptions_more_storage_url
|
'https://customers.stg.gitlab.com/buy_storage'
:subscriptions_manage_url
|
'https://customers.stg.gitlab.com/subscriptions'
:subscriptions_plans_url
|
'https://customers.stg.gitlab.com/plans'
:subscriptions_instance_review_url
|
'https://customers.stg.gitlab.com/instance_review'
:subscriptions_gitlab_plans_url
|
'https://customers.stg.gitlab.com/gitlab_plans'
:default_subscriptions_url
|
'https://customers.st
agin
g.gitlab.com'
:payment_form_url
|
'https://customers.st
agin
g.gitlab.com/payment_forms/cc_validation'
:subscriptions_graphql_url
|
'https://customers.st
agin
g.gitlab.com/graphql'
:subscriptions_more_minutes_url
|
'https://customers.st
agin
g.gitlab.com/buy_pipeline_minutes'
:subscriptions_more_storage_url
|
'https://customers.st
agin
g.gitlab.com/buy_storage'
:subscriptions_manage_url
|
'https://customers.st
agin
g.gitlab.com/subscriptions'
:subscriptions_plans_url
|
'https://customers.st
agin
g.gitlab.com/plans'
:subscriptions_instance_review_url
|
'https://customers.st
agin
g.gitlab.com/instance_review'
:subscriptions_gitlab_plans_url
|
'https://customers.st
agin
g.gitlab.com/gitlab_plans'
end
with_them
do
...
...
@@ -78,7 +77,7 @@ RSpec.describe ::Gitlab::SubscriptionPortal do
let
(
:group_id
)
{
153
}
it
{
is_expected
.
to
eq
(
"https://customers.stg.gitlab.com/gitlab/namespaces/
#{
group_id
}
/extra_seats"
)
}
it
{
is_expected
.
to
eq
(
"https://customers.st
agin
g.gitlab.com/gitlab/namespaces/
#{
group_id
}
/extra_seats"
)
}
end
describe
'.upgrade_subscription_url'
do
...
...
@@ -87,7 +86,7 @@ RSpec.describe ::Gitlab::SubscriptionPortal do
let
(
:group_id
)
{
153
}
let
(
:plan_id
)
{
5
}
it
{
is_expected
.
to
eq
(
"https://customers.stg.gitlab.com/gitlab/namespaces/
#{
group_id
}
/upgrade/
#{
plan_id
}
"
)
}
it
{
is_expected
.
to
eq
(
"https://customers.st
agin
g.gitlab.com/gitlab/namespaces/
#{
group_id
}
/upgrade/
#{
plan_id
}
"
)
}
end
describe
'.renew_subscription_url'
do
...
...
@@ -95,6 +94,6 @@ RSpec.describe ::Gitlab::SubscriptionPortal do
let
(
:group_id
)
{
153
}
it
{
is_expected
.
to
eq
(
"https://customers.stg.gitlab.com/gitlab/namespaces/
#{
group_id
}
/renew"
)
}
it
{
is_expected
.
to
eq
(
"https://customers.st
agin
g.gitlab.com/gitlab/namespaces/
#{
group_id
}
/renew"
)
}
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment