Commit 0a4817dd authored by Dylan Griffith's avatar Dylan Griffith Committed by Stan Hu

In Prometheus use update! instead of update

In order to not miss any errors since we are not checking the return
value of update
parent 50fa7847
......@@ -21,7 +21,7 @@ module Clusters
state_machine :status do
after_transition any => [:installed] do |application|
application.cluster.projects.each do |project|
project.find_or_initialize_service('prometheus').update(active: true)
project.find_or_initialize_service('prometheus').update!(active: true)
end
end
end
......@@ -94,7 +94,7 @@ module Clusters
def disable_prometheus_integration
cluster.projects.each do |project|
project.prometheus_service&.update(active: false)
project.prometheus_service&.update!(active: false)
end
end
......
......@@ -40,7 +40,7 @@ describe Clusters::Applications::Prometheus do
end
it 'ensures Prometheus service is activated' do
expect(prometheus_service).to receive(:update).with(active: true)
expect(prometheus_service).to receive(:update!).with(active: true)
subject.make_installed
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment