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
fb30aa62
Commit
fb30aa62
authored
May 30, 2018
by
Jasper Maes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use strings as properties key in kubernetes service spec.
parent
439adb96
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
changelogs/unreleased/rails5-fix-46230.yml
changelogs/unreleased/rails5-fix-46230.yml
+5
-0
spec/models/project_services/kubernetes_service_spec.rb
spec/models/project_services/kubernetes_service_spec.rb
+6
-6
No files found.
changelogs/unreleased/rails5-fix-46230.yml
0 → 100644
View file @
fb30aa62
---
title
:
Use strings as properties key in kubernetes service spec.
merge_request
:
19265
author
:
Jasper Maes
type
:
fixed
spec/models/project_services/kubernetes_service_spec.rb
View file @
fb30aa62
...
@@ -65,7 +65,7 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do
...
@@ -65,7 +65,7 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do
before
do
before
do
kubernetes_service
.
update_attribute
(
:active
,
false
)
kubernetes_service
.
update_attribute
(
:active
,
false
)
kubernetes_service
.
properties
[
:namespace
]
=
"foo"
kubernetes_service
.
properties
[
'namespace'
]
=
"foo"
end
end
it
'should not update attributes'
do
it
'should not update attributes'
do
...
@@ -82,7 +82,7 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do
...
@@ -82,7 +82,7 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do
let
(
:kubernetes_service
)
{
create
(
:kubernetes_service
)
}
let
(
:kubernetes_service
)
{
create
(
:kubernetes_service
)
}
it
'should update attributes'
do
it
'should update attributes'
do
kubernetes_service
.
properties
[
:namespace
]
=
'foo'
kubernetes_service
.
properties
[
'namespace'
]
=
'foo'
expect
(
kubernetes_service
.
save
).
to
be_truthy
expect
(
kubernetes_service
.
save
).
to
be_truthy
end
end
end
end
...
@@ -92,7 +92,7 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do
...
@@ -92,7 +92,7 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do
before
do
before
do
kubernetes_service
.
active
=
false
kubernetes_service
.
active
=
false
kubernetes_service
.
properties
[
:namespace
]
=
'foo'
kubernetes_service
.
properties
[
'namespace'
]
=
'foo'
kubernetes_service
.
save
kubernetes_service
.
save
end
end
...
@@ -105,7 +105,7 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do
...
@@ -105,7 +105,7 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do
end
end
it
'should update attributes'
do
it
'should update attributes'
do
expect
(
kubernetes_service
.
properties
[
:namespace
]).
to
eq
(
"foo"
)
expect
(
kubernetes_service
.
properties
[
'namespace'
]).
to
eq
(
"foo"
)
end
end
end
end
...
@@ -113,12 +113,12 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do
...
@@ -113,12 +113,12 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do
let
(
:kubernetes_service
)
{
create
(
:kubernetes_service
,
template:
true
,
active:
false
)
}
let
(
:kubernetes_service
)
{
create
(
:kubernetes_service
,
template:
true
,
active:
false
)
}
before
do
before
do
kubernetes_service
.
properties
[
:namespace
]
=
'foo'
kubernetes_service
.
properties
[
'namespace'
]
=
'foo'
end
end
it
'should update attributes'
do
it
'should update attributes'
do
expect
(
kubernetes_service
.
save
).
to
be_truthy
expect
(
kubernetes_service
.
save
).
to
be_truthy
expect
(
kubernetes_service
.
properties
[
:namespace
]).
to
eq
(
'foo'
)
expect
(
kubernetes_service
.
properties
[
'namespace'
]).
to
eq
(
'foo'
)
end
end
end
end
end
end
...
...
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