Commit 7a5da502 authored by Jasper Maes's avatar Jasper Maes Committed by Dennis Tang

Use strings as properties key in kubernetes service spec.

parent 8d8e8f77
---
title: Use strings as properties key in kubernetes service spec.
merge_request: 19265
author: Jasper Maes
type: fixed
...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment