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
5f181b2d
Commit
5f181b2d
authored
Dec 11, 2020
by
Tiger
Committed by
Jose Vargas
Jan 04, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable canary deployment user callout
parent
e4167f1a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
18 deletions
+2
-18
ee/app/helpers/ee/user_callouts_helper.rb
ee/app/helpers/ee/user_callouts_helper.rb
+1
-4
ee/spec/helpers/ee/user_callouts_helper_spec.rb
ee/spec/helpers/ee/user_callouts_helper_spec.rb
+1
-14
No files found.
ee/app/helpers/ee/user_callouts_helper.rb
View file @
5f181b2d
...
...
@@ -16,10 +16,7 @@ module EE
THREAT_MONITORING_INFO
=
'threat_monitoring_info'
def
show_canary_deployment_callout?
(
project
)
!
user_dismissed?
(
CANARY_DEPLOYMENT
)
&&
show_promotions?
&&
# use :canary_deployments if we create a feature flag for it in the future
!
project
.
feature_available?
(
:deploy_board
)
false
end
def
render_enable_hashed_storage_warning
...
...
ee/spec/helpers/ee/user_callouts_helper_spec.rb
View file @
5f181b2d
...
...
@@ -141,10 +141,6 @@ RSpec.describe EE::UserCalloutsHelper do
end
context
'when user needs to upgrade to canary deployments'
do
before
do
allow
(
project
).
to
receive
(
:feature_available?
).
with
(
:deploy_board
).
and_return
(
false
)
end
context
'when user has dismissed'
do
before
do
allow
(
helper
).
to
receive
(
:user_dismissed?
).
and_return
(
true
)
...
...
@@ -158,19 +154,10 @@ RSpec.describe EE::UserCalloutsHelper do
allow
(
helper
).
to
receive
(
:user_dismissed?
).
and_return
(
false
)
end
it
{
is_expected
.
to
be_truthy
}
end
end
context
'when user already has access to canary deployments'
do
before
do
allow
(
project
).
to
receive
(
:feature_available?
).
with
(
:deploy_board
).
and_return
(
true
)
allow
(
helper
).
to
receive
(
:user_dismissed?
).
and_return
(
false
)
end
it
{
is_expected
.
to
be_falsey
}
end
end
end
describe
'#render_dashboard_gold_trial'
do
let_it_be
(
:namespace
)
{
create
(
:namespace
)
}
...
...
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