Sha256: 471a390ca89eadf9a322c7ae0e453c4878ccaa15a3177b552be2108e44fbf4e0
Contents?: true
Size: 1.17 KB
Versions: 29
Compression:
Stored size: 1.17 KB
Contents
require 'spec_helper' module Beaker describe Fusion do let( :fusion ) { Beaker::Fusion.new( @hosts, make_opts ) } before :each do stub_const( "Fission::VM", true ) @hosts = make_hosts() MockFission.presets( @hosts ) Fusion.any_instance.stub( :require ).with( 'fission' ).and_return( true ) fusion.instance_variable_set( :@fission, MockFission ) end it "can interoperate with the fission library to provision hosts" do fusion.provision end it "raises an error if unknown snapshot name is used" do @hosts[0][:snapshot] = 'unknown' expect{ fusion.provision }.to raise_error end it 'raises an error if snapshots is nil' do MockFissionVM.set_snapshots(nil) expect{ fusion.provision }.to raise_error(/No snapshots available/) end it 'raises an error if snapshots are empty' do MockFissionVM.set_snapshots([]) expect{ fusion.provision }.to raise_error(/No snapshots available/) end it 'host fails init with nil snapshot' do @hosts[0][:snapshot] = nil expect{ Beaker::Fusion.new( @hosts, make_opts) }.to raise_error(/specify a snapshot/) end end end
Version data entries
29 entries across 29 versions & 1 rubygems