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
cff4a50e
Commit
cff4a50e
authored
Nov 21, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests for Clusters::Platforms::Kubernetes
parent
0d95ce51
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
12 deletions
+4
-12
spec/models/clusters/platforms/kubernetes_spec.rb
spec/models/clusters/platforms/kubernetes_spec.rb
+4
-12
No files found.
spec/models/clusters/platforms/kubernetes_spec.rb
View file @
cff4a50e
...
@@ -161,16 +161,8 @@ describe Clusters::Platforms::Kubernetes, :use_clean_rails_memory_store_caching
...
@@ -161,16 +161,8 @@ describe Clusters::Platforms::Kubernetes, :use_clean_rails_memory_store_caching
end
end
end
end
describe
'.namespace_for_project'
do
subject
{
described_class
.
namespace_for_project
(
project
)
}
let
(
:project
)
{
create
(
:project
)
}
it
{
is_expected
.
to
eq
(
"
#{
project
.
path
}
-
#{
project
.
id
}
"
)
}
end
describe
'#default_namespace'
do
describe
'#default_namespace'
do
subject
{
kubernetes
.
default_namespace
}
subject
{
kubernetes
.
send
(
:default_namespace
)
}
let
(
:kubernetes
)
{
create
(
:cluster_platform_kubernetes
,
:configured
)
}
let
(
:kubernetes
)
{
create
(
:cluster_platform_kubernetes
,
:configured
)
}
...
@@ -190,7 +182,7 @@ describe Clusters::Platforms::Kubernetes, :use_clean_rails_memory_store_caching
...
@@ -190,7 +182,7 @@ describe Clusters::Platforms::Kubernetes, :use_clean_rails_memory_store_caching
describe
'#predefined_variables'
do
describe
'#predefined_variables'
do
let!
(
:cluster
)
{
create
(
:cluster
,
:project
,
platform_kubernetes:
kubernetes
)
}
let!
(
:cluster
)
{
create
(
:cluster
,
:project
,
platform_kubernetes:
kubernetes
)
}
let
(
:kubernetes
)
{
create
(
:platform_kubernetes
,
api_url:
api_url
,
ca_cert:
ca_pem
,
token:
token
)
}
let
(
:kubernetes
)
{
create
(
:
cluster_
platform_kubernetes
,
api_url:
api_url
,
ca_cert:
ca_pem
,
token:
token
)
}
let
(
:api_url
)
{
'https://kube.domain.com'
}
let
(
:api_url
)
{
'https://kube.domain.com'
}
let
(
:ca_pem
)
{
'CA PEM DATA'
}
let
(
:ca_pem
)
{
'CA PEM DATA'
}
let
(
:token
)
{
'token'
}
let
(
:token
)
{
'token'
}
...
@@ -248,7 +240,7 @@ describe Clusters::Platforms::Kubernetes, :use_clean_rails_memory_store_caching
...
@@ -248,7 +240,7 @@ describe Clusters::Platforms::Kubernetes, :use_clean_rails_memory_store_caching
let!
(
:cluster
)
{
create
(
:cluster
,
:project
,
platform_kubernetes:
service
)
}
let!
(
:cluster
)
{
create
(
:cluster
,
:project
,
platform_kubernetes:
service
)
}
let
(
:project
)
{
cluster
.
project
}
let
(
:project
)
{
cluster
.
project
}
let
(
:service
)
{
create
(
:platform_kubernetes
,
:configured
)
}
let
(
:service
)
{
create
(
:
cluster_
platform_kubernetes
,
:configured
)
}
let
(
:environment
)
{
build
(
:environment
,
project:
project
,
name:
"env"
,
slug:
"env-000000"
)
}
let
(
:environment
)
{
build
(
:environment
,
project:
project
,
name:
"env"
,
slug:
"env-000000"
)
}
context
'with invalid pods'
do
context
'with invalid pods'
do
...
@@ -287,7 +279,7 @@ describe Clusters::Platforms::Kubernetes, :use_clean_rails_memory_store_caching
...
@@ -287,7 +279,7 @@ describe Clusters::Platforms::Kubernetes, :use_clean_rails_memory_store_caching
subject
{
service
.
calculate_reactive_cache
}
subject
{
service
.
calculate_reactive_cache
}
let!
(
:cluster
)
{
create
(
:cluster
,
:project
,
enabled:
enabled
,
platform_kubernetes:
service
)
}
let!
(
:cluster
)
{
create
(
:cluster
,
:project
,
enabled:
enabled
,
platform_kubernetes:
service
)
}
let
(
:service
)
{
create
(
:platform_kubernetes
,
:configured
)
}
let
(
:service
)
{
create
(
:
cluster_
platform_kubernetes
,
:configured
)
}
let
(
:enabled
)
{
true
}
let
(
:enabled
)
{
true
}
context
'when cluster is disabled'
do
context
'when cluster is disabled'
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