summaryrefslogtreecommitdiff
path: root/spec/models/clusters
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-23 15:06:32 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-23 15:06:32 +0000
commit6f9edd1a4c4942d3d13ec54793cfae56164b1a0a (patch)
treef118f4a1dcad2db7b35ab15157e16eef56eba860 /spec/models/clusters
parent94e614c94c0a42e261e6af88c89461d90f3330c0 (diff)
downloadgitlab-ce-6f9edd1a4c4942d3d13ec54793cfae56164b1a0a.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/clusters')
-rw-r--r--spec/models/clusters/cluster_spec.rb2
-rw-r--r--spec/models/clusters/kubernetes_namespace_spec.rb14
-rw-r--r--spec/models/clusters/platforms/kubernetes_spec.rb2
3 files changed, 9 insertions, 9 deletions
diff --git a/spec/models/clusters/cluster_spec.rb b/spec/models/clusters/cluster_spec.rb
index df6263eeed2..06f454808e3 100644
--- a/spec/models/clusters/cluster_spec.rb
+++ b/spec/models/clusters/cluster_spec.rb
@@ -546,7 +546,7 @@ describe Clusters::Cluster, :use_clean_rails_memory_store_caching do
before do
expect(Clusters::KubernetesNamespaceFinder).to receive(:new)
- .with(cluster, project: environment.project, environment_slug: environment.slug)
+ .with(cluster, project: environment.project, environment_name: environment.name)
.and_return(double(execute: persisted_namespace))
end
diff --git a/spec/models/clusters/kubernetes_namespace_spec.rb b/spec/models/clusters/kubernetes_namespace_spec.rb
index d4e3a0ac84d..2920bbf2b58 100644
--- a/spec/models/clusters/kubernetes_namespace_spec.rb
+++ b/spec/models/clusters/kubernetes_namespace_spec.rb
@@ -24,13 +24,13 @@ RSpec.describe Clusters::KubernetesNamespace, type: :model do
end
end
- describe '.with_environment_slug' do
+ describe '.with_environment_name' do
let(:cluster) { create(:cluster, :group) }
- let(:environment) { create(:environment, slug: slug) }
+ let(:environment) { create(:environment, name: name) }
- let(:slug) { 'production' }
+ let(:name) { 'production' }
- subject { described_class.with_environment_slug(slug) }
+ subject { described_class.with_environment_name(name) }
context 'there is no associated environment' do
let!(:namespace) { create(:cluster_kubernetes_namespace, cluster: cluster, project: environment.project) }
@@ -48,12 +48,12 @@ RSpec.describe Clusters::KubernetesNamespace, type: :model do
)
end
- context 'with a matching slug' do
+ context 'with a matching name' do
it { is_expected.to eq [namespace] }
end
- context 'without a matching slug' do
- let(:environment) { create(:environment, slug: 'staging') }
+ context 'without a matching name' do
+ let(:environment) { create(:environment, name: 'staging') }
it { is_expected.to be_empty }
end
diff --git a/spec/models/clusters/platforms/kubernetes_spec.rb b/spec/models/clusters/platforms/kubernetes_spec.rb
index 0c4cf291d20..64de6a8ab9b 100644
--- a/spec/models/clusters/platforms/kubernetes_spec.rb
+++ b/spec/models/clusters/platforms/kubernetes_spec.rb
@@ -218,7 +218,7 @@ describe Clusters::Platforms::Kubernetes do
before do
allow(Clusters::KubernetesNamespaceFinder).to receive(:new)
- .with(cluster, project: project, environment_slug: environment_slug)
+ .with(cluster, project: project, environment_name: environment_name)
.and_return(double(execute: persisted_namespace))
end