diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-25 12:18:44 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-25 12:18:44 +0300 |
commit | af69e63b6655a450849a8fa2640ae6ce5a8db681 (patch) | |
tree | db12602500f5ece6ada7383180055389a9b3d319 /spec/models/clusters | |
parent | b7d907c10e1d0d23abffa6abc59764e292fb89f1 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/clusters')
-rw-r--r-- | spec/models/clusters/cluster_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/clusters/kubernetes_namespace_spec.rb | 10 | ||||
-rw-r--r-- | spec/models/clusters/platforms/kubernetes_spec.rb | 34 |
3 files changed, 27 insertions, 19 deletions
diff --git a/spec/models/clusters/cluster_spec.rb b/spec/models/clusters/cluster_spec.rb index 189affa3c88..d501325dd90 100644 --- a/spec/models/clusters/cluster_spec.rb +++ b/spec/models/clusters/cluster_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' RSpec.describe Clusters::Cluster, :use_clean_rails_memory_store_caching, -feature_category: :deployment_management do + feature_category: :deployment_management do include ReactiveCachingHelpers include KubernetesHelpers diff --git a/spec/models/clusters/kubernetes_namespace_spec.rb b/spec/models/clusters/kubernetes_namespace_spec.rb index e70cd15baca..40d381e4dd6 100644 --- a/spec/models/clusters/kubernetes_namespace_spec.rb +++ b/spec/models/clusters/kubernetes_namespace_spec.rb @@ -69,10 +69,12 @@ RSpec.describe Clusters::KubernetesNamespace, type: :model do context 'when cluster is using the namespace' do before do - create(:cluster_kubernetes_namespace, - cluster: kubernetes_namespace.cluster, - environment: kubernetes_namespace.environment, - namespace: 'my-namespace') + create( + :cluster_kubernetes_namespace, + cluster: kubernetes_namespace.cluster, + environment: kubernetes_namespace.environment, + namespace: 'my-namespace' + ) end it { is_expected.not_to be_valid } diff --git a/spec/models/clusters/platforms/kubernetes_spec.rb b/spec/models/clusters/platforms/kubernetes_spec.rb index efe511bf1c5..c32abaf50f5 100644 --- a/spec/models/clusters/platforms/kubernetes_spec.rb +++ b/spec/models/clusters/platforms/kubernetes_spec.rb @@ -198,10 +198,12 @@ RSpec.describe Clusters::Platforms::Kubernetes do subject { kubernetes.kubeclient } before do - create(:cluster_kubernetes_namespace, - cluster: kubernetes.cluster, - cluster_project: kubernetes.cluster.cluster_project, - project: kubernetes.cluster.cluster_project.project) + create( + :cluster_kubernetes_namespace, + cluster: kubernetes.cluster, + cluster_project: kubernetes.cluster.cluster_project, + project: kubernetes.cluster.cluster_project.project + ) end it { is_expected.to be_an_instance_of(Gitlab::Kubernetes::KubeClient) } @@ -209,11 +211,13 @@ RSpec.describe Clusters::Platforms::Kubernetes do context 'ca_pem is a single certificate' do let(:ca_pem) { File.read(Rails.root.join('spec/fixtures/clusters/root_certificate.pem')) } let(:kubernetes) do - build(:cluster_platform_kubernetes, - :configured, - namespace: 'a-namespace', - cluster: cluster, - ca_pem: ca_pem) + build( + :cluster_platform_kubernetes, + :configured, + namespace: 'a-namespace', + cluster: cluster, + ca_pem: ca_pem + ) end it 'adds it to cert_store' do @@ -227,11 +231,13 @@ RSpec.describe Clusters::Platforms::Kubernetes do context 'ca_pem is a chain' do let(:cert_chain) { File.read(Rails.root.join('spec/fixtures/clusters/chain_certificates.pem')) } let(:kubernetes) do - build(:cluster_platform_kubernetes, - :configured, - namespace: 'a-namespace', - cluster: cluster, - ca_pem: cert_chain) + build( + :cluster_platform_kubernetes, + :configured, + namespace: 'a-namespace', + cluster: cluster, + ca_pem: cert_chain + ) end where(:fixture_path) do |