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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
7277b3b3
Commit
7277b3b3
authored
Nov 28, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix feature spec
parent
b4c4e1bd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
app/models/project.rb
app/models/project.rb
+0
-1
spec/features/auto_deploy_spec.rb
spec/features/auto_deploy_spec.rb
+8
-2
spec/features/projects/environments/environments_spec.rb
spec/features/projects/environments/environments_spec.rb
+1
-1
No files found.
app/models/project.rb
View file @
7277b3b3
...
...
@@ -903,7 +903,6 @@ class Project < ActiveRecord::Base
end
# TODO: This will be extended for multiple enviroment clusters
# TODO: Add super nice tests to check this interchangeability
def
deployment_platform
@deployment_platform
||=
clusters
.
find_by
(
enabled:
true
)
&
.
platform_kubernetes
@deployment_platform
||=
services
.
where
(
category: :deployment
).
reorder
(
nil
).
find_by
(
active:
true
)
...
...
spec/features/auto_deploy_spec.rb
View file @
7277b3b3
...
...
@@ -7,7 +7,7 @@ describe 'Auto deploy' do
shared_examples
'same behavior between KubernetesService and Platform::Kubernetes'
do
context
'when no deployment service is active'
do
before
do
project
.
kubernetes_service
.
update!
(
active:
false
)
trun_off
end
it
'does not show a button to set up auto deploy'
do
...
...
@@ -18,7 +18,7 @@ describe 'Auto deploy' do
context
'when a deployment service is active'
do
before
do
project
.
kubernetes_service
.
update!
(
active:
true
)
trun_on
visit
project_path
(
project
)
end
...
...
@@ -56,6 +56,9 @@ describe 'Auto deploy' do
sign_in
user
end
let
(
:trun_on
)
{
project
.
deployment_platform
.
update!
(
active:
true
)
}
let
(
:trun_off
)
{
project
.
deployment_platform
.
update!
(
active:
false
)
}
it_behaves_like
'same behavior between KubernetesService and Platform::Kubernetes'
end
...
...
@@ -66,6 +69,9 @@ describe 'Auto deploy' do
sign_in
user
end
let
(
:trun_on
)
{
project
.
deployment_platform
.
cluster
.
update!
(
enabled:
true
)
}
let
(
:trun_off
)
{
project
.
deployment_platform
.
cluster
.
update!
(
enabled:
false
)
}
it_behaves_like
'same behavior between KubernetesService and Platform::Kubernetes'
end
end
spec/features/projects/environments/environments_spec.rb
View file @
7277b3b3
...
...
@@ -233,7 +233,7 @@ feature 'Environments page', :js do
end
context
'when user configured kubernetes from CI/CD > Clusters'
do
let
!
(
:cluster
)
{
create
(
:cluster
,
:project
,
:provided_by_gcp
)
}
let
(
:cluster
)
{
create
(
:cluster
,
:provided_by_gcp
,
projects:
[
create
(
:project
,
:repository
)]
)
}
let
(
:project
)
{
cluster
.
project
}
it_behaves_like
'same behavior between KubernetesService and Platform::Kubernetes'
...
...
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