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
d3015405
Commit
d3015405
authored
Feb 03, 2022
by
vvempati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove new_route_ci_minutes_purchase feature flag
Changelog: changed
parent
01b824b1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
105 deletions
+16
-105
config/feature_flags/development/new_route_ci_minutes_purchase.yml
...ature_flags/development/new_route_ci_minutes_purchase.yml
+0
-8
ee/app/controllers/subscriptions_controller.rb
ee/app/controllers/subscriptions_controller.rb
+0
-2
ee/app/helpers/ee/namespaces_helper.rb
ee/app/helpers/ee/namespaces_helper.rb
+1
-1
ee/spec/controllers/subscriptions_controller_spec.rb
ee/spec/controllers/subscriptions_controller_spec.rb
+0
-9
ee/spec/features/groups/usage_quotas_spec.rb
ee/spec/features/groups/usage_quotas_spec.rb
+4
-18
ee/spec/helpers/ee/namespaces_helper_spec.rb
ee/spec/helpers/ee/namespaces_helper_spec.rb
+11
-67
No files found.
config/feature_flags/development/new_route_ci_minutes_purchase.yml
deleted
100644 → 0
View file @
01b824b1
---
name
:
new_route_ci_minutes_purchase
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/54934
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/322582
milestone
:
'
13.10'
type
:
development
group
:
group::purchase
default_enabled
:
true
ee/app/controllers/subscriptions_controller.rb
View file @
d3015405
...
...
@@ -48,8 +48,6 @@ class SubscriptionsController < ApplicationController
@active_subscription
=
result
[
:active_subscription
]
return
render_404
if
@group
.
nil?
render_404
unless
Feature
.
enabled?
(
:new_route_ci_minutes_purchase
,
@group
,
default_enabled: :yaml
)
end
def
buy_storage
...
...
ee/app/helpers/ee/namespaces_helper.rb
View file @
d3015405
...
...
@@ -58,7 +58,7 @@ module EE
private
def
use_customers_dot_for_minutes_path?
(
namespace
)
namespace
.
user_namespace?
||
::
Feature
.
disabled?
(
:new_route_ci_minutes_purchase
,
namespace
,
default_enabled: :yaml
)
namespace
.
user_namespace?
end
def
use_customers_dot_for_storage_path?
(
namespace
)
...
...
ee/spec/controllers/subscriptions_controller_spec.rb
View file @
d3015405
...
...
@@ -86,7 +86,6 @@ RSpec.describe SubscriptionsController do
context
'with authenticated user'
do
before
do
group
.
add_owner
(
user
)
stub_feature_flags
(
new_route_ci_minutes_purchase:
group
)
sign_in
(
user
)
end
...
...
@@ -135,14 +134,6 @@ RSpec.describe SubscriptionsController do
expect
(
assigns
(
:group
)).
to
eq
group
expect
(
assigns
(
:account_id
)).
to
eq
nil
end
context
'with :new_route_ci_minutes_purchase disabled'
do
before
do
stub_feature_flags
(
new_route_ci_minutes_purchase:
false
)
end
it
{
is_expected
.
to
have_gitlab_http_status
(
:not_found
)
}
end
end
end
end
...
...
ee/spec/features/groups/usage_quotas_spec.rb
View file @
d3015405
...
...
@@ -186,25 +186,11 @@ RSpec.describe 'Groups > Usage Quotas' do
end
end
describe
'new_route_ci_minutes_purchase feature flag'
do
context
'when is disabled'
do
before
do
stub_feature_flags
(
new_route_ci_minutes_purchase:
false
)
end
it
'points to Customers Portal purchase flow'
do
visit_pipeline_quota_page
expect
(
page
).
to
have_link
(
'Buy additional minutes'
,
href:
EE
::
SUBSCRIPTIONS_MORE_MINUTES_URL
)
end
end
context
'when is enabled'
do
it
'points to GitLab purchase flow'
do
visit_pipeline_quota_page
context
'when purchasing CI minutes'
do
it
'points to GitLab CI minutes purchase flow'
do
visit_pipeline_quota_page
expect
(
page
).
to
have_link
(
'Buy additional minutes'
,
href:
buy_minutes_subscriptions_path
(
selected_group:
group
.
id
))
end
expect
(
page
).
to
have_link
(
'Buy additional minutes'
,
href:
buy_minutes_subscriptions_path
(
selected_group:
group
.
id
))
end
end
...
...
ee/spec/helpers/ee/namespaces_helper_spec.rb
View file @
d3015405
...
...
@@ -179,39 +179,12 @@ RSpec.describe EE::NamespacesHelper do
it
{
is_expected
.
to
eq
buy_minutes_subscriptions_path
(
selected_group:
namespace
.
id
)
}
context
'new_route_ci_minutes_purchase'
do
context
'when is disabled'
do
before
do
stub_feature_flags
(
new_route_ci_minutes_purchase:
false
)
end
it
{
is_expected
.
to
eq
EE
::
SUBSCRIPTIONS_MORE_MINUTES_URL
}
end
context
'when new_route_ci_minutes_purchase is enabled only for a specific namespace'
do
let
(
:enabled_namespace
)
{
build_stubbed
(
:group
)
}
before
do
stub_feature_flags
(
new_route_ci_minutes_purchase:
false
)
stub_feature_flags
(
new_route_ci_minutes_purchase:
enabled_namespace
)
end
it
'returns the default purchase path for the disabled namespace'
do
expect
(
helper
.
buy_additional_minutes_path
(
namespace
)).
to
eq
EE
::
SUBSCRIPTIONS_MORE_MINUTES_URL
end
it
'returns GitLab purchase path for the disabled namespace'
do
expect
(
helper
.
buy_additional_minutes_path
(
enabled_namespace
)).
to
eq
buy_minutes_subscriptions_path
(
selected_group:
enabled_namespace
.
id
)
end
end
context
'when called for a personal namespace'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:personal_namespace
)
{
build_stubbed
(
:user_namespace
)
}
context
'when called for a personal namespace'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:personal_namespace
)
{
build_stubbed
(
:user_namespace
)
}
it
'returns the default purchase'
do
expect
(
helper
.
buy_additional_minutes_path
(
personal_namespace
)).
to
eq
EE
::
SUBSCRIPTIONS_MORE_MINUTES_URL
end
it
'returns the default purchase'
do
expect
(
helper
.
buy_additional_minutes_path
(
personal_namespace
)).
to
eq
EE
::
SUBSCRIPTIONS_MORE_MINUTES_URL
end
end
end
...
...
@@ -265,43 +238,14 @@ RSpec.describe EE::NamespacesHelper do
let
(
:namespace
)
{
create
(
:group
)
}
context
'new_route_ci_minutes_purchase'
do
context
'when is disabled'
do
before
do
stub_feature_flags
(
new_route_ci_minutes_purchase:
false
)
end
it
{
is_expected
.
to
eq
'_blank'
}
end
context
'when is enabled'
do
it
{
is_expected
.
to
eq
'_self'
}
end
context
'when is enabled only for a specific namespace'
do
let
(
:enabled_namespace
)
{
build_stubbed
(
:group
)
}
before
do
stub_feature_flags
(
new_route_ci_minutes_purchase:
false
)
stub_feature_flags
(
new_route_ci_minutes_purchase:
enabled_namespace
)
end
it
'returns _blank for the disabled namespace'
do
expect
(
helper
.
buy_additional_minutes_target
(
namespace
)).
to
eq
'_blank'
end
it
{
is_expected
.
to
eq
'_self'
}
it
'returns _self for the disabled namespace'
do
expect
(
helper
.
buy_additional_minutes_target
(
enabled_namespace
)).
to
eq
'_self'
end
end
context
'when called for a personal namespace'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:personal_namespace
)
{
build_stubbed
(
:user_namespace
)
}
context
'when called for a personal namespace'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:personal_namespace
)
{
build_stubbed
(
:user_namespace
)
}
it
'returns _blank'
do
expect
(
helper
.
buy_additional_minutes_target
(
personal_namespace
)).
to
eq
'_blank'
end
it
'returns _blank'
do
expect
(
helper
.
buy_additional_minutes_target
(
personal_namespace
)).
to
eq
'_blank'
end
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