diff options
author | Rémy Coutable <remy@rymai.me> | 2018-05-31 11:28:50 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-05-31 11:28:50 +0000 |
commit | a53a0487aeed592509e76bfeb7146b5825edcc47 (patch) | |
tree | 38828f335fe6174abc8f12d373d0d069723e8d2a | |
parent | a2f8f092a5e571de0d9dd3def95decb8f8684ad4 (diff) | |
parent | fb30aa62d81db4f467e8128d39f55d25be83fdc0 (diff) | |
download | gitlab-ce-a53a0487aeed592509e76bfeb7146b5825edcc47.tar.gz |
Merge branch 'rails5-fix-46230' into 'master'
Use strings as properties key in kubernetes service spec.
See merge request gitlab-org/gitlab-ce!19265
-rw-r--r-- | changelogs/unreleased/rails5-fix-46230.yml | 5 | ||||
-rw-r--r-- | spec/models/project_services/kubernetes_service_spec.rb | 12 |
2 files changed, 11 insertions, 6 deletions
diff --git a/changelogs/unreleased/rails5-fix-46230.yml b/changelogs/unreleased/rails5-fix-46230.yml new file mode 100644 index 00000000000..8ec28604483 --- /dev/null +++ b/changelogs/unreleased/rails5-fix-46230.yml @@ -0,0 +1,5 @@ +--- +title: Use strings as properties key in kubernetes service spec. +merge_request: 19265 +author: Jasper Maes +type: fixed diff --git a/spec/models/project_services/kubernetes_service_spec.rb b/spec/models/project_services/kubernetes_service_spec.rb index 3be023a48c1..68ab9fd08ec 100644 --- a/spec/models/project_services/kubernetes_service_spec.rb +++ b/spec/models/project_services/kubernetes_service_spec.rb @@ -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 |