diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-15 15:09:05 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-15 15:09:05 +0300 |
commit | 69b0ff9002af73de066a6f28e4a61ccf1fddd9a7 (patch) | |
tree | 3293d32d37eebcbe07b6e23a3ee02f203846f8cd /spec/services | |
parent | 73ff43129b98d433923d144fccd2e47c33c3b091 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/clusters/integrations/create_service_spec.rb | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/spec/services/clusters/integrations/create_service_spec.rb b/spec/services/clusters/integrations/create_service_spec.rb index d80640cbc4d..cfc0943b6ad 100644 --- a/spec/services/clusters/integrations/create_service_spec.rb +++ b/spec/services/clusters/integrations/create_service_spec.rb @@ -17,9 +17,9 @@ RSpec.describe Clusters::Integrations::CreateService, '#execute' do it 'creates a new Prometheus instance' do expect(service.execute).to be_success - expect(cluster.application_prometheus).to be_present - expect(cluster.application_prometheus).to be_persisted - expect(cluster.application_prometheus).to be_externally_installed + expect(cluster.integration_prometheus).to be_present + expect(cluster.integration_prometheus).to be_persisted + expect(cluster.integration_prometheus).to be_enabled end context 'enabled param is false' do @@ -30,9 +30,9 @@ RSpec.describe Clusters::Integrations::CreateService, '#execute' do it 'creates a new uninstalled Prometheus instance' do expect(service.execute).to be_success - expect(cluster.application_prometheus).to be_present - expect(cluster.application_prometheus).to be_persisted - expect(cluster.application_prometheus).to be_uninstalled + expect(cluster.integration_prometheus).to be_present + expect(cluster.integration_prometheus).to be_persisted + expect(cluster.integration_prometheus).not_to be_enabled end end @@ -46,21 +46,21 @@ RSpec.describe Clusters::Integrations::CreateService, '#execute' do it 'does not create a new Prometheus instance' do expect(service.execute).to be_error - expect(cluster.application_prometheus).to be_nil + expect(cluster.integration_prometheus).to be_nil end end context 'prometheus record exists' do before do - create(:clusters_applications_prometheus, cluster: cluster) + create(:clusters_integrations_prometheus, cluster: cluster) end it 'updates the Prometheus instance' do expect(service.execute).to be_success - expect(cluster.application_prometheus).to be_present - expect(cluster.application_prometheus).to be_persisted - expect(cluster.application_prometheus).to be_externally_installed + expect(cluster.integration_prometheus).to be_present + expect(cluster.integration_prometheus).to be_persisted + expect(cluster.integration_prometheus).to be_enabled end context 'enabled param is false' do @@ -71,9 +71,9 @@ RSpec.describe Clusters::Integrations::CreateService, '#execute' do it 'updates the Prometheus instance as uninstalled' do expect(service.execute).to be_success - expect(cluster.application_prometheus).to be_present - expect(cluster.application_prometheus).to be_persisted - expect(cluster.application_prometheus).to be_uninstalled + expect(cluster.integration_prometheus).to be_present + expect(cluster.integration_prometheus).to be_persisted + expect(cluster.integration_prometheus).not_to be_enabled end end end |