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
9f19b649
Commit
9f19b649
authored
Mar 15, 2019
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix protected environment initilizer
ok add changelog
parent
9b815128
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
1 deletion
+25
-1
ee/app/controllers/ee/projects/settings/ci_cd_controller.rb
ee/app/controllers/ee/projects/settings/ci_cd_controller.rb
+1
-1
ee/changelogs/unreleased/fix-protected-environment-initialize.yml
...elogs/unreleased/fix-protected-environment-initialize.yml
+5
-0
ee/spec/features/projects/settings/protected_environments_spec.rb
...features/projects/settings/protected_environments_spec.rb
+19
-0
No files found.
ee/app/controllers/ee/projects/settings/ci_cd_controller.rb
View file @
9f19b649
...
...
@@ -27,7 +27,7 @@ module EE
# rubocop: disable CodeReuse/ActiveRecord
def
define_protected_env_variables
@protected_environments
=
@project
.
protected_environments
.
order
(
:name
)
@protected_environment
=
@project
.
protected_environments
.
new
@protected_environment
=
ProtectedEnvironment
.
new
(
project:
@project
)
end
# rubocop: enable CodeReuse/ActiveRecord
...
...
ee/changelogs/unreleased/fix-protected-environment-initialize.yml
0 → 100644
View file @
9f19b649
---
title
:
Fix protected environment initializer
merge_request
:
10150
author
:
type
:
fixed
ee/spec/features/projects/settings/protected_environments_spec.rb
View file @
9f19b649
...
...
@@ -86,6 +86,25 @@ describe 'Protected Environments' do
expect
(
page
).
not_to
have_content
(
'production'
)
end
end
context
'when projects_tokens_optional_encryption feature flag is false'
do
before
do
stub_feature_flags
(
projects_tokens_optional_encryption:
false
)
end
context
'when runners_token exists but runners_token_encrypted is empty'
do
before
do
project
.
update_column
(
:runners_token
,
'abc'
)
project
.
update_column
(
:runners_token_encrypted
,
nil
)
end
it
'shows setting page correctly'
do
visit
project_settings_ci_cd_path
(
project
)
expect
(
page
).
to
have_gitlab_http_status
(
200
)
end
end
end
end
def
set_protected_environment
(
environment_name
)
...
...
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