diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-20 18:19:03 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-20 18:19:03 +0300 |
commit | 14bd84b61276ef29b97d23642d698de769bacfd2 (patch) | |
tree | f9eba90140c1bd874211dea17750a0d422c04080 /spec/lib/gitlab/kubernetes/config_map_spec.rb | |
parent | 891c388697b2db0d8ee0c8358a9bdbf6dc56d581 (diff) |
Add latest changes from gitlab-org/gitlab@15-10-stable-eev15.10.0-rc42
Diffstat (limited to 'spec/lib/gitlab/kubernetes/config_map_spec.rb')
-rw-r--r-- | spec/lib/gitlab/kubernetes/config_map_spec.rb | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/spec/lib/gitlab/kubernetes/config_map_spec.rb b/spec/lib/gitlab/kubernetes/config_map_spec.rb index 2d0d205ffb1..ebc2202921b 100644 --- a/spec/lib/gitlab/kubernetes/config_map_spec.rb +++ b/spec/lib/gitlab/kubernetes/config_map_spec.rb @@ -4,20 +4,23 @@ require 'spec_helper' RSpec.describe Gitlab::Kubernetes::ConfigMap do let(:kubeclient) { double('kubernetes client') } - let(:application) { create(:clusters_applications_prometheus) } - let(:config_map) { described_class.new(application.name, application.files) } + let(:name) { 'my-name' } + let(:files) { [] } + let(:config_map) { described_class.new(name, files) } let(:namespace) { Gitlab::Kubernetes::Helm::NAMESPACE } let(:metadata) do { - name: "values-content-configuration-#{application.name}", + name: "values-content-configuration-#{name}", namespace: namespace, - labels: { name: "values-content-configuration-#{application.name}" } + labels: { name: "values-content-configuration-#{name}" } } end describe '#generate' do - let(:resource) { ::Kubeclient::Resource.new(metadata: metadata, data: application.files) } + let(:resource) do + ::Kubeclient::Resource.new(metadata: metadata, data: files) + end subject { config_map.generate } @@ -28,7 +31,8 @@ RSpec.describe Gitlab::Kubernetes::ConfigMap do describe '#config_map_name' do it 'returns the config_map name' do - expect(config_map.config_map_name).to eq("values-content-configuration-#{application.name}") + expect(config_map.config_map_name) + .to eq("values-content-configuration-#{name}") end end end |