summaryrefslogtreecommitdiff
path: root/spec/requests/api/project_clusters_spec.rb
diff options
context:
space:
mode:
authorTiger <twatson@gitlab.com>2019-05-16 17:49:12 -0500
committerTiger <twatson@gitlab.com>2019-05-21 11:38:11 -0500
commit101c4480b32044682e453753c6bb18c2a296b044 (patch)
tree46b6ac3df55c748a6854bdb5c02a696228a7e9fc /spec/requests/api/project_clusters_spec.rb
parent0702d4b6899648ba12a747824f3db86c2f4aa42e (diff)
downloadgitlab-ce-61935-remove-code-left-over-from-when-clusters-were-always-project-specific.tar.gz
When Kubernetes clusters were originally built they could only exist at the project level, and so there was logic included that assumed there would only ever be a single Kubernetes namespace per cluster. We now support clusters at the group and instance level, which allows multiple namespaces. This change consolidates various project-specific fallbacks to generate namespaces, and hands all responsibility to the Clusters::KubernetesNamespace model. There is now no concept of a single namespace for a Clusters::Platforms::Kubernetes; to retrieve a namespace a project must now be supplied in all cases. This simplifies upcoming work to use a separate Kubernetes namespace per project environment (instead of a namespace per project).
Diffstat (limited to 'spec/requests/api/project_clusters_spec.rb')
-rw-r--r--spec/requests/api/project_clusters_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/requests/api/project_clusters_spec.rb b/spec/requests/api/project_clusters_spec.rb
index 5357be3cdee..fc0381159dd 100644
--- a/spec/requests/api/project_clusters_spec.rb
+++ b/spec/requests/api/project_clusters_spec.rb
@@ -351,7 +351,7 @@ describe API::ProjectClusters do
it 'does not update cluster attributes' do
expect(cluster.domain).not_to eq('new_domain.com')
expect(cluster.platform_kubernetes.namespace).not_to eq('invalid_namespace')
- expect(cluster.kubernetes_namespace.namespace).not_to eq('invalid_namespace')
+ expect(cluster.kubernetes_namespace_for(project)).not_to eq('invalid_namespace')
end
it 'returns validation errors' do