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
5efea3a2
Commit
5efea3a2
authored
Nov 01, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix pipeline. Fix routing when validation failed.
parent
882cf2e4
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
7 deletions
+11
-7
app/controllers/projects/clusters_controller.rb
app/controllers/projects/clusters_controller.rb
+1
-1
app/views/projects/clusters/new_gcp.html.haml
app/views/projects/clusters/new_gcp.html.haml
+1
-1
config/routes/project.rb
config/routes/project.rb
+1
-1
spec/controllers/projects/clusters_controller_spec.rb
spec/controllers/projects/clusters_controller_spec.rb
+3
-3
spec/features/projects/clusters_spec.rb
spec/features/projects/clusters_spec.rb
+5
-1
No files found.
app/controllers/projects/clusters_controller.rb
View file @
5efea3a2
...
...
@@ -41,7 +41,7 @@ class Projects::ClustersController < Projects::ApplicationController
if
@cluster
.
persisted?
redirect_to
project_cluster_path
(
project
,
@cluster
)
else
render
:new
render
:new
_gcp
end
end
...
...
app/views/projects/clusters/new_gcp.html.haml
View file @
5efea3a2
config/routes/project.rb
View file @
5efea3a2
...
...
@@ -186,7 +186,7 @@ constraints(ProjectUrlConstrainer.new) do
resources
:clusters
,
except:
[
:edit
]
do
collection
do
get
:login
get
'/providers/gcp/new'
,
to
: :new_gcp
get
'/providers/gcp/new'
,
action
: :new_gcp
end
member
do
...
...
spec/controllers/projects/clusters_controller_spec.rb
View file @
5efea3a2
...
...
@@ -73,11 +73,11 @@ describe Projects::ClustersController do
end
end
describe
'GET new'
do
describe
'GET new
_gcp
'
do
render_views
subject
do
get
:new
,
namespace_id:
project
.
namespace
,
get
:new
_gcp
,
namespace_id:
project
.
namespace
,
project_id:
project
end
...
...
@@ -150,7 +150,7 @@ describe Projects::ClustersController do
it
'shows an error message'
do
expect
{
subject
}.
not_to
change
{
Gcp
::
Cluster
.
count
}
expect
(
response
).
to
render_template
(
:new
)
expect
(
response
).
to
render_template
(
:new
_gcp
)
end
end
end
...
...
spec/features/projects/clusters_spec.rb
View file @
5efea3a2
...
...
@@ -18,6 +18,8 @@ feature 'Clusters', :js do
context
'when user does not have a cluster and visits cluster index page'
do
before
do
visit
project_clusters_path
(
project
)
click_link
'Create on GKE'
end
it
'user sees a new page'
do
...
...
@@ -93,7 +95,7 @@ feature 'Clusters', :js do
it
'user sees creation form with the succeccful message'
do
expect
(
page
).
to
have_content
(
'Cluster integration was successfully removed.'
)
expect
(
page
).
to
have_
button
(
'Create cluster
'
)
expect
(
page
).
to
have_
content
(
'Choose how to set up cluster integration
'
)
end
end
end
...
...
@@ -102,6 +104,8 @@ feature 'Clusters', :js do
context
'when user has not signed in Google'
do
before
do
visit
project_clusters_path
(
project
)
click_link
'Create on GKE'
end
it
'user sees a login page'
do
...
...
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