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
4a1e1281
Commit
4a1e1281
authored
Dec 21, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert conflicting EE changes
parent
3cb8f01b
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
30 additions
and
22 deletions
+30
-22
spec/factories/projects.rb
spec/factories/projects.rb
+13
-13
spec/features/auto_deploy_spec.rb
spec/features/auto_deploy_spec.rb
+9
-1
spec/features/environment_spec.rb
spec/features/environment_spec.rb
+1
-1
spec/features/environments_spec.rb
spec/features/environments_spec.rb
+1
-1
spec/models/environment_spec.rb
spec/models/environment_spec.rb
+3
-3
spec/models/project_services/kubernetes_service_spec.rb
spec/models/project_services/kubernetes_service_spec.rb
+1
-1
spec/models/project_spec.rb
spec/models/project_spec.rb
+1
-1
spec/workers/reactive_caching_worker_spec.rb
spec/workers/reactive_caching_worker_spec.rb
+1
-1
No files found.
spec/factories/projects.rb
View file @
4a1e1281
...
...
@@ -48,19 +48,6 @@ FactoryGirl.define do
end
end
trait
:kubernetes
do
after
:create
do
|
project
|
project
.
create_kubernetes_service
(
active:
true
,
properties:
{
namespace:
project
.
path
,
api_url:
'https://kubernetes.example.com/api'
,
token:
'a'
*
40
,
}
)
end
end
# Nest Project Feature attributes
transient
do
wiki_access_level
ProjectFeature
::
ENABLED
...
...
@@ -150,4 +137,17 @@ FactoryGirl.define do
)
end
end
factory
:kubernetes_project
,
parent: :empty_project
do
after
:create
do
|
project
|
project
.
create_kubernetes_service
(
active:
true
,
properties:
{
namespace:
project
.
path
,
api_url:
'https://kubernetes.example.com'
,
token:
'a'
*
40
,
}
)
end
end
end
spec/features/auto_deploy_spec.rb
View file @
4a1e1281
...
...
@@ -4,9 +4,17 @@ describe 'Auto deploy' do
include
WaitForAjax
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:kubernetes
)
}
let
(
:project
)
{
create
(
:project
)
}
before
do
project
.
create_kubernetes_service
(
active:
true
,
properties:
{
namespace:
project
.
path
,
api_url:
'https://kubernetes.example.com'
,
token:
'a'
*
40
,
}
)
project
.
team
<<
[
user
,
:master
]
login_as
user
end
...
...
spec/features/environment_spec.rb
View file @
4a1e1281
...
...
@@ -93,7 +93,7 @@ feature 'Environment', :feature do
end
context
'with terminal'
do
let
(
:project
)
{
create
(
:
empty_project
,
:kubernetes
,
:test_repo
)
}
let
(
:project
)
{
create
(
:
kubernetes_project
,
:test_repo
)
}
context
'for project master'
do
let
(
:role
)
{
:master
}
...
...
spec/features/environments_spec.rb
View file @
4a1e1281
...
...
@@ -151,7 +151,7 @@ feature 'Environments page', :feature, :js do
end
context
'with terminal'
do
let
(
:project
)
{
create
(
:
empty_project
,
:kubernetes
,
:test_repo
)
}
let
(
:project
)
{
create
(
:
kubernetes_project
,
:test_repo
)
}
context
'for project master'
do
let
(
:role
)
{
:master
}
...
...
spec/models/environment_spec.rb
View file @
4a1e1281
...
...
@@ -200,7 +200,7 @@ describe Environment, models: true do
context
'when the enviroment is available'
do
context
'with a deployment service'
do
let
(
:project
)
{
create
(
:
empty_project
,
:kubernetes
)
}
let
(
:project
)
{
create
(
:
kubernetes_project
)
}
context
'and a deployment'
do
let!
(
:deployment
)
{
create
(
:deployment
,
environment:
environment
)
}
...
...
@@ -218,14 +218,14 @@ describe Environment, models: true do
end
context
'when the environment is unavailable'
do
let
(
:project
)
{
create
(
:
empty_project
,
:kubernetes
)
}
let
(
:project
)
{
create
(
:
kubernetes_project
)
}
before
{
environment
.
stop
}
it
{
is_expected
.
to
be_falsy
}
end
end
describe
'#terminals'
do
let
(
:project
)
{
create
(
:
empty_project
,
:kubernetes
)
}
let
(
:project
)
{
create
(
:
kubernetes_project
)
}
subject
{
environment
.
terminals
}
context
'when the environment has terminals'
do
...
...
spec/models/project_services/kubernetes_service_spec.rb
View file @
4a1e1281
...
...
@@ -4,7 +4,7 @@ describe KubernetesService, models: true, caching: true do
include
KubernetesHelpers
include
ReactiveCachingHelpers
let
(
:project
)
{
create
(
:
empty_project
,
:kubernetes
)
}
let
(
:project
)
{
create
(
:
kubernetes_project
)
}
let
(
:service
)
{
project
.
kubernetes_service
}
# We use Kubeclient to interactive with the Kubernetes API. It will
...
...
spec/models/project_spec.rb
View file @
4a1e1281
...
...
@@ -1719,7 +1719,7 @@ describe Project, models: true do
end
context
'when project has a deployment service'
do
let
(
:project
)
{
create
(
:
empty_project
,
:kubernetes
)
}
let
(
:project
)
{
create
(
:
kubernetes_project
)
}
it
'returns variables from this service'
do
expect
(
project
.
deployment_variables
).
to
include
(
...
...
spec/workers/reactive_caching_worker_spec.rb
View file @
4a1e1281
require
'spec_helper'
describe
ReactiveCachingWorker
do
let
(
:project
)
{
create
(
:
empty_project
,
:kubernetes
)
}
let
(
:project
)
{
create
(
:
kubernetes_project
)
}
let
(
:service
)
{
project
.
deployment_service
}
subject
{
described_class
.
new
.
perform
(
"KubernetesService"
,
service
.
id
)
}
...
...
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