diff options
author | Thong Kuah <tkuah@gitlab.com> | 2019-02-12 16:13:59 +1300 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2019-02-15 12:34:23 +1300 |
commit | 9eeca2db6db51e1d7b121a0efdfe14b517dea4b6 (patch) | |
tree | efd98ebc11bfb63a48b9b2281ac8a9f16d9275c9 /spec/models/clusters | |
parent | e2a56bd1ae6af4166db108eca4455530d98f6aa8 (diff) | |
download | gitlab-ce-9eeca2db6db51e1d7b121a0efdfe14b517dea4b6.tar.gz |
Move common method to application concern
This could be potentially useful to all cluster applications.
Address followup issue https://gitlab.com/gitlab-org/gitlab-ce/issues/56524
Diffstat (limited to 'spec/models/clusters')
-rw-r--r-- | spec/models/clusters/applications/prometheus_spec.rb | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/spec/models/clusters/applications/prometheus_spec.rb b/spec/models/clusters/applications/prometheus_spec.rb index caf59b0fc31..4996088f921 100644 --- a/spec/models/clusters/applications/prometheus_spec.rb +++ b/spec/models/clusters/applications/prometheus_spec.rb @@ -39,65 +39,6 @@ describe Clusters::Applications::Prometheus do end end - describe '#ready' do - let(:project) { create(:project) } - let(:cluster) { create(:cluster, projects: [project]) } - - it 'returns true when installed' do - application = build(:clusters_applications_prometheus, :installed, cluster: cluster) - - expect(application).to be_ready - end - - it 'returns false when not_installable' do - application = build(:clusters_applications_prometheus, :not_installable, cluster: cluster) - - expect(application).not_to be_ready - end - - it 'returns false when installable' do - application = build(:clusters_applications_prometheus, :installable, cluster: cluster) - - expect(application).not_to be_ready - end - - it 'returns false when scheduled' do - application = build(:clusters_applications_prometheus, :scheduled, cluster: cluster) - - expect(application).not_to be_ready - end - - it 'returns false when installing' do - application = build(:clusters_applications_prometheus, :installing, cluster: cluster) - - expect(application).not_to be_ready - end - - it 'returns false when errored' do - application = build(:clusters_applications_prometheus, :errored, cluster: cluster) - - expect(application).not_to be_ready - end - - it 'returns true when updating' do - application = build(:clusters_applications_prometheus, :updating, cluster: cluster) - - expect(application).to be_ready - end - - it 'returns true when updated' do - application = build(:clusters_applications_prometheus, :updated, cluster: cluster) - - expect(application).to be_ready - end - - it 'returns true when errored' do - application = build(:clusters_applications_prometheus, :update_errored, cluster: cluster) - - expect(application).to be_ready - end - end - describe '#prometheus_client' do context 'cluster is nil' do it 'returns nil' do |