Commit a53a0487 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'rails5-fix-46230' into 'master'

Use strings as properties key in kubernetes service spec.

See merge request gitlab-org/gitlab-ce!19265
parents a2f8f092 fb30aa62
---
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
before do
kubernetes_service.update_attribute(:active, false)
kubernetes_service.properties[:namespace] = "foo"
kubernetes_service.properties['namespace'] = "foo"
end
it 'should not update attributes' do
......@@ -82,7 +82,7 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do
let(:kubernetes_service) { create(:kubernetes_service) }
it 'should update attributes' do
kubernetes_service.properties[:namespace] = 'foo'
kubernetes_service.properties['namespace'] = 'foo'
expect(kubernetes_service.save).to be_truthy
end
end
......@@ -92,7 +92,7 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do
before do
kubernetes_service.active = false
kubernetes_service.properties[:namespace] = 'foo'
kubernetes_service.properties['namespace'] = 'foo'
kubernetes_service.save
end
......@@ -105,7 +105,7 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do
end
it 'should update attributes' do
expect(kubernetes_service.properties[:namespace]).to eq("foo")
expect(kubernetes_service.properties['namespace']).to eq("foo")
end
end
......@@ -113,12 +113,12 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do
let(:kubernetes_service) { create(:kubernetes_service, template: true, active: false) }
before do
kubernetes_service.properties[:namespace] = 'foo'
kubernetes_service.properties['namespace'] = 'foo'
end
it 'should update attributes' do
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
......
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