diff options
author | Rémy Coutable <remy@rymai.me> | 2017-12-01 15:55:06 +0100 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-12-01 15:55:06 +0100 |
commit | 97552d46fef3958aad4dfa3b67d43edb78513f66 (patch) | |
tree | 39eb6fca33ce0e4f0903b75e03bfc9ee937c7b2a | |
parent | 4820a195833810c14260915a1c443a1bbdbe8839 (diff) | |
download | gitlab-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.rb | 2 | ||||
-rw-r--r-- | spec/services/clusters/applications/schedule_installation_service_spec.rb | 2 |
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 |