Merge branch 'storing_templates_in_s3' into fix_failing_spec
This commit is contained in:
commit
5f5e9fdb19
@ -7,8 +7,20 @@ RSpec.describe Devops::Model::StackTemplateEc2, type: :model do
|
|||||||
before do
|
before do
|
||||||
allow(Provider::ProviderFactory).to receive(:providers).and_return(%w(ec2))
|
allow(Provider::ProviderFactory).to receive(:providers).and_return(%w(ec2))
|
||||||
allow_any_instance_of(Devops::Model::StackTemplateEc2).to receive_message_chain('provider_instance.validate_stack_template') { true }
|
allow_any_instance_of(Devops::Model::StackTemplateEc2).to receive_message_chain('provider_instance.validate_stack_template') { true }
|
||||||
allow_any_instance_of(Devops::Model::StackTemplateEc2).to receive_message_chain('provider_instance.store_file') { {'url' => nil} }
|
allow_any_instance_of(Devops::Model::StackTemplateEc2).to receive_message_chain('provider_instance.store_stack_template') { {'url' => nil} }
|
||||||
end
|
end
|
||||||
|
|
||||||
it_behaves_like 'stack template'
|
it_behaves_like 'stack template'
|
||||||
|
|
||||||
|
it 'uploads file to S3' do
|
||||||
|
expect_any_instance_of(Devops::Model::StackTemplateEc2).to receive_message_chain('provider_instance.store_stack_template')
|
||||||
|
params = {
|
||||||
|
'id' => 'foo',
|
||||||
|
'template_body' => '{}',
|
||||||
|
'owner' => 'root',
|
||||||
|
'provider' => 'ec2'
|
||||||
|
}
|
||||||
|
expect(described_class.create(params)).to be_an_instance_of(described_class)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
Loading…
Reference in New Issue
Block a user