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
d8685ee8
Commit
d8685ee8
authored
Jan 15, 2021
by
Andy Soiron
Committed by
Kerri Miller
Jan 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove reset_integrations feature flag
parent
77c27fd9
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
56 deletions
+15
-56
app/helpers/services_helper.rb
app/helpers/services_helper.rb
+3
-5
changelogs/unreleased/283875_remove_reset_integrations_feature_flag.yml
...eleased/283875_remove_reset_integrations_feature_flag.yml
+5
-0
config/feature_flags/development/reset_integrations.yml
config/feature_flags/development/reset_integrations.yml
+0
-8
spec/helpers/services_helper_spec.rb
spec/helpers/services_helper_spec.rb
+7
-43
No files found.
app/helpers/services_helper.rb
View file @
d8685ee8
...
@@ -76,6 +76,8 @@ module ServicesHelper
...
@@ -76,6 +76,8 @@ module ServicesHelper
end
end
def
scoped_reset_integration_path
(
integration
,
group:
nil
)
def
scoped_reset_integration_path
(
integration
,
group:
nil
)
return
''
unless
integration
.
persisted?
if
group
.
present?
if
group
.
present?
reset_group_settings_integration_path
(
group
,
integration
)
reset_group_settings_integration_path
(
group
,
integration
)
else
else
...
@@ -102,7 +104,7 @@ module ServicesHelper
...
@@ -102,7 +104,7 @@ module ServicesHelper
cancel_path:
scoped_integrations_path
,
cancel_path:
scoped_integrations_path
,
can_test:
integration
.
can_test?
.
to_s
,
can_test:
integration
.
can_test?
.
to_s
,
test_path:
scoped_test_integration_path
(
integration
),
test_path:
scoped_test_integration_path
(
integration
),
reset_path:
reset_integration?
(
integration
,
group:
group
)
?
scoped_reset_integration_path
(
integration
,
group:
group
)
:
''
reset_path:
scoped_reset_integration_path
(
integration
,
group:
group
)
}
}
end
end
...
@@ -126,10 +128,6 @@ module ServicesHelper
...
@@ -126,10 +128,6 @@ module ServicesHelper
!
Gitlab
.
com?
!
Gitlab
.
com?
end
end
def
reset_integration?
(
integration
,
group:
nil
)
integration
.
persisted?
&&
Feature
.
enabled?
(
:reset_integrations
,
group
,
type: :development
)
end
extend
self
extend
self
private
private
...
...
changelogs/unreleased/283875_remove_reset_integrations_feature_flag.yml
0 → 100644
View file @
d8685ee8
---
title
:
Allow resetting group and instance level integrations
merge_request
:
51507
author
:
type
:
added
config/feature_flags/development/reset_integrations.yml
deleted
100644 → 0
View file @
77c27fd9
---
name
:
reset_integrations
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/47546
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/283875
milestone
:
'
13.7'
type
:
development
group
:
group::ecosystem
default_enabled
:
false
spec/helpers/services_helper_spec.rb
View file @
d8685ee8
...
@@ -25,6 +25,10 @@ RSpec.describe ServicesHelper do
...
@@ -25,6 +25,10 @@ RSpec.describe ServicesHelper do
:integration_level
:integration_level
)
)
end
end
specify
do
expect
(
subject
[
:reset_path
]).
to
eq
(
helper
.
scoped_reset_integration_path
(
integration
))
end
end
end
end
end
...
@@ -47,52 +51,12 @@ RSpec.describe ServicesHelper do
...
@@ -47,52 +51,12 @@ RSpec.describe ServicesHelper do
is_expected
.
to
eq
(
reset_group_settings_integration_path
(
group
,
integration
))
is_expected
.
to
eq
(
reset_group_settings_integration_path
(
group
,
integration
))
end
end
end
end
end
describe
'#reset_integration?'
do
let
(
:group
)
{
nil
}
subject
{
helper
.
reset_integration?
(
integration
,
group:
group
)
}
context
'when integration is existing record'
do
let_it_be
(
:integration
)
{
create
(
:jira_service
)
}
context
'when `reset_integrations` is not enabled'
do
it
'returns false'
do
stub_feature_flags
(
reset_integrations:
false
)
is_expected
.
to
eq
(
false
)
end
end
context
'when `reset_integrations` is enabled'
do
it
'returns true'
do
stub_feature_flags
(
reset_integrations:
true
)
is_expected
.
to
eq
(
true
)
end
end
context
'when `reset_integrations` is enabled for a group'
do
let
(
:group
)
{
build_stubbed
(
:group
)
}
it
'returns true'
do
stub_feature_flags
(
reset_integrations:
group
)
is_expected
.
to
eq
(
true
)
end
end
end
context
'when
integration is a new recor
d'
do
context
'when
a new integration is not persiste
d'
do
let_it_be
(
:integration
)
{
build
(
:jira_service
)
}
let_it_be
(
:integration
)
{
build
(
:jira_service
)
}
context
'when `reset_integrations` is enabled'
do
it
'returns an empty string'
do
it
'returns false'
do
is_expected
.
to
eq
(
''
)
stub_feature_flags
(
reset_integrations:
true
)
is_expected
.
to
eq
(
false
)
end
end
end
end
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