Sha256: 05d63194509ba64c93b693bcea946c880cb72829d62397265ee18727564368aa
Contents?: true
Size: 1.26 KB
Versions: 2
Compression:
Stored size: 1.26 KB
Contents
#$:.unshift File.join(File.dirname(__FILE__), '..', '..', '..') require 'require_relative' if RUBY_VERSION < '1.9' require_relative 'common.rb' describe 'FgcpDriver Images' do before do @driver = Deltacloud::new(:fgcp, credentials) VCR.insert_cassette __name__ end after do VCR.eject_cassette end it 'must throw error when wrong credentials' do Proc.new do @driver.backend.images(OpenStruct.new(:user => 'unknown', :password => 'wrong')) end.must_raise Deltacloud::Exceptions::AuthenticationFailure, 'Authentication Failure' end it 'must return list of images' do imgs = @driver.images imgs.wont_be_empty imgs.first.must_be_kind_of Deltacloud::Image end it 'must allow to filter images' do img = @driver.images(:id => 'IMG_3c9820_S24FWXU0Q9VH0JK') img.wont_be_empty img.must_be_kind_of Array img.size.must_equal 1 img.first.id.must_equal 'IMG_3c9820_S24FWXU0Q9VH0JK' @driver.images(:id => 'unknown').must_be_empty end it 'must allow to retrieve single image' do img = @driver.image(:id => 'IMG_3c9820_S24FWXU0Q9VH0JK') img.wont_be_nil img.must_be_kind_of Deltacloud::Image img.id.must_equal 'IMG_3c9820_S24FWXU0Q9VH0JK' @driver.image(:id => 'unknown').must_be_nil end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
deltacloud-core-1.1.3 | tests/drivers/fgcp/images_test.rb |
deltacloud-core-1.1.2 | tests/drivers/fgcp/images_test.rb |