From 44eec56834b7f524a2bf99d0f5e1571b52576d72 Mon Sep 17 00:00:00 2001 From: Thong Kuah Date: Fri, 12 Apr 2019 17:42:48 +1200 Subject: Expose can_uninstall in cluster_status.json Only prometheus can be uninstalled atm, the rest will be dealt with later. Presumption is that new application types will have uninstallation implmemented at the same time. --- spec/models/clusters/applications/runner_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'spec/models/clusters/applications/runner_spec.rb') diff --git a/spec/models/clusters/applications/runner_spec.rb b/spec/models/clusters/applications/runner_spec.rb index b66acf13135..bdc0cb8ed86 100644 --- a/spec/models/clusters/applications/runner_spec.rb +++ b/spec/models/clusters/applications/runner_spec.rb @@ -13,6 +13,14 @@ describe Clusters::Applications::Runner do it { is_expected.to belong_to(:runner) } + describe '#can_uninstall?' do + let(:gitlab_runner) { create(:clusters_applications_runner, runner: ci_runner) } + + subject { gitlab_runner.can_uninstall? } + + it { is_expected.to be_falsey } + end + describe '#install_command' do let(:kubeclient) { double('kubernetes client') } let(:gitlab_runner) { create(:clusters_applications_runner, runner: ci_runner) } -- cgit v1.2.1