Merge branch 'precreating_report' into bug_fix
This commit is contained in:
commit
e1ba3fee7c
@ -15,6 +15,7 @@ RSpec.describe StackBootstrapWorker, type: :worker, stubbed_connector: true do
|
||||
before do
|
||||
allow(Provider::ProviderFactory).to receive(:providers).and_return(%w(ec2))
|
||||
allow(stubbed_connector).to receive(:save_report)
|
||||
allow(stubbed_connector).to receive(:report) { build(:report) }
|
||||
allow(stubbed_connector).to receive(:report_update)
|
||||
allow(stubbed_connector).to receive(:stack_insert)
|
||||
|
||||
|
||||
@ -132,7 +132,8 @@ class Worker
|
||||
end
|
||||
|
||||
def update_report(additional_report_attrs)
|
||||
report_attrs = additional_report_attrs.merge('_id' => jid, 'file' => @file)
|
||||
initial_report = mongo.report(jid)
|
||||
report_attrs = initial_report.to_mongo_hash.merge(additional_report_attrs)
|
||||
report = Devops::Model::Report.new(report_attrs)
|
||||
mongo.report_update(report)
|
||||
report
|
||||
|
||||
Loading…
Reference in New Issue
Block a user