summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-12-01 15:55:06 +0100
committerRémy Coutable <remy@rymai.me>2017-12-01 15:55:06 +0100
commit97552d46fef3958aad4dfa3b67d43edb78513f66 (patch)
tree39eb6fca33ce0e4f0903b75e03bfc9ee937c7b2a
parent4820a195833810c14260915a1c443a1bbdbe8839 (diff)
downloadgitlab-ce-97552d46fef3958aad4dfa3b67d43edb78513f66.tar.gz
Ensure `Namespace`'s is namespaced in `Gitlab::Kubernetes::Helm#initialize` and fix a transient failing spec due to that
Signed-off-by: Rémy Coutable <remy@rymai.me>
-rw-r--r--lib/gitlab/kubernetes/helm.rb2
-rw-r--r--spec/services/clusters/applications/schedule_installation_service_spec.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/kubernetes/helm.rb b/lib/gitlab/kubernetes/helm.rb
index 7a50f07f3c5..407cdefc04d 100644
--- a/lib/gitlab/kubernetes/helm.rb
+++ b/lib/gitlab/kubernetes/helm.rb
@@ -18,7 +18,7 @@ module Gitlab
def initialize(kubeclient)
@kubeclient = kubeclient
- @namespace = Namespace.new(NAMESPACE, kubeclient)
+ @namespace = Gitlab::Kubernetes::Namespace.new(NAMESPACE, kubeclient)
end
def install(command)
diff --git a/spec/services/clusters/applications/schedule_installation_service_spec.rb b/spec/services/clusters/applications/schedule_installation_service_spec.rb
index cf95361c935..047a6e44dab 100644
--- a/spec/services/clusters/applications/schedule_installation_service_spec.rb
+++ b/spec/services/clusters/applications/schedule_installation_service_spec.rb
@@ -22,6 +22,8 @@ describe Clusters::Applications::ScheduleInstallationService do
let(:service) { described_class.new(project, nil, cluster: cluster, application_class: application_class) }
it 'creates a new application' do
+ allow(ClusterInstallAppWorker).to receive(:perform_async)
+
expect { service.execute }.to change { application_class.count }.by(1)
end