Commit e33e0c3d authored by Ted Young's avatar Ted Young Committed by Colin Obyrne

Don't try to create a Cloud in deployment_plan unit specs

Assembler.new calls Config.cloud which tries to write a directory. CI
doesn't like this. We stubbed out Config.cloud since no code path we
care about hits it. The Assembler is a bummer.
Signed-off-by: default avatarColin Obyrne <cobyrne@pivotal.io>
parent e6fd8dbd
......@@ -39,7 +39,6 @@ module Bosh::Director
}
end
describe 'parse' do
it 'parses disk_pools' do
manifest = minimal_manifest
......@@ -196,7 +195,10 @@ module Bosh::Director
]
)
end
before { Bosh::Director::App.new(Bosh::Director::Config.load_file(asset('test-director-config.yml'))) }
before do
setup_global_config_and_stubbing
end
context 'given prior deployment with old release versions' do
let(:stale_release_version) do
......@@ -249,7 +251,9 @@ module Bosh::Director
describe '#update_stemcell_references!' do
subject { Planner.parse(manifest, cloud_config, {}, Config.event_log, Config.logger) }
let(:manifest) { ManifestHelper.default_legacy_manifest }
before { Bosh::Director::App.new(Bosh::Director::Config.load_file(asset('test-director-config.yml'))) }
before do
setup_global_config_and_stubbing
end
context "when the stemcells associated with the resource pools have diverged from the stemcells associated with the planner" do
let(:stemcell_model_1) { Bosh::Director::Models::Stemcell.create(name: 'default', version: '1', cid: 'abc') }
......@@ -276,6 +280,11 @@ module Bosh::Director
end
end
end
def setup_global_config_and_stubbing
Bosh::Director::App.new(Bosh::Director::Config.load_file(asset('test-director-config.yml')))
allow(Bosh::Director::Config).to receive(:cloud) { instance_double(Bosh::Cloud) }
end
end
end
end
......@@ -11,6 +11,7 @@ module Bosh::Director::Jobs
let(:manifest_content) { Psych.dump ManifestHelper.default_legacy_manifest }
before do
allow(Bosh::Director::Config).to receive(:cloud) { instance_double(Bosh::Cloud) }
Bosh::Director::App.new(config)
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